Zdravim ta potreboval by som
mat nejake pole napr: aby v premennej "b" boli retezce + - * / a jeden button ktory by mi generoval tie 4 chary a vypisoval ich v nejakom tom labeli..
DIk moc..

var
Form1: TForm1; b: Array[1..4] of char;procedure TForm1.FormCreate(Sender: TObject);
begin
b[1]:='+';
b[2]:='-';
b[3]:='*';
b[4]:='/';
end;procedure TForm1.Button1Click(Sender: TObject);
begin
Label1.Caption:=b[1];
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
Label1.Caption:=b[Rnd(1,4)];
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
IF Label1.Caption='/' THEN Label2.Caption := FloatToStr(StrToInt(Edit1.Text) / StrToInt(Edit2.Text));
IF Label1.Caption='*' THEN Label2.Caption := IntToStr(StrToInt(Edit1.Text) * StrToInt(Edit2.Text));
IF Label1.Caption='+' THEN Label2.Caption := IntToStr(StrToInt(Edit1.Text) + StrToInt(Edit2.Text));
IF Label1.Caption='-' THEN Label2.Caption := IntToStr(StrToInt(Edit1.Text) - StrToInt(Edit2.Text));
end;
Užívatelia prezerajúci si toto fórum: Žiadny registrovaný používateľ a 1 hosť.