Добавил:
Tushkan
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз:
Предмет:
Файл:Готовые лабораторные работы (ММ) / Lrlen4-L / Unit2
.cpp//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Unit2.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm2 *Form2;
char EnterWord[20];
char vek1[10];
//---------------------------------------------------------------------------
__fastcall TForm2::TForm2(TComponent* Owner)
: TForm(Owner)
{
int i;
for(i=0;i<20;i++)
StG1->Cells[i][0]="";
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button2Click(TObject *Sender)
{
Close();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button1Click(TObject *Sender)
{
int i;
for (i=0;i<20;i++)
{
strcpy(vek1,StG1->Cells[i][0].c_str());
EnterWord[i]=vek1[0];
}
Close();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button3Click(TObject *Sender)
{
StG1->Cells[0][0]="c";
StG1->Cells[1][0]="b";
StG1->Cells[2][0]="b";
StG1->Cells[3][0]="b";
StG1->Cells[4][0]="b";
StG1->Cells[5][0]="b";
StG1->Cells[6][0]="a";
StG1->Cells[7][0]="a";
StG1->Cells[8][0]="c";
StG1->Cells[9][0]="b";
StG1->Cells[10][0]="b";
StG1->Cells[11][0]="c";
StG1->Cells[12][0]="c";
StG1->Cells[13][0]="a";
StG1->Cells[14][0]="c";
StG1->Cells[15][0]="c";
StG1->Cells[16][0]="b";
StG1->Cells[17][0]="c";
StG1->Cells[18][0]="c";
StG1->Cells[19][0]="a";
}
//---------------------------------------------------------------------------
Соседние файлы в папке Lrlen4-L