Даны три числа. Если их произведение меньше 50, то числа увеличить в 10 раз. Составить программу в Delphi
Ответы
Ответ дал:
0
a:=strtofloat(edit1.text);
b:=strtofloat(edit1.text);
c:=strtofloat(edit1.text);
d:=a*b*c;
if d<50 then
begin
a:=a*10;
b:=strtofloat(edit1.text);
c:=strtofloat(edit1.text);
d:=a*b*c;
if d<50 then
begin
a:=a*10;
Ответ дал:
0
procedure TForm21.Button1Click(Sender: TObject);
var a,b,c,d:real;
begin
a:=strtofloat(edit1.text);
b:=strtofloat(edit2.text);
c:=strtofloat(edit3.text);
d:=a*b*c;
if d<50 then
begin
a:=a*10; edit1.Text:=floattostr(a);
b:=b*10; edit2.Text:=floattostr(b);
c:=c*10; edit3.Text:=floattostr(c)
end else
Label1.Caption:='Proizvedenie chisel >50';
end;
procedure TForm21.Button3Click(Sender: TObject);
begin
close;
end;
end.
var a,b,c,d:real;
begin
a:=strtofloat(edit1.text);
b:=strtofloat(edit2.text);
c:=strtofloat(edit3.text);
d:=a*b*c;
if d<50 then
begin
a:=a*10; edit1.Text:=floattostr(a);
b:=b*10; edit2.Text:=floattostr(b);
c:=c*10; edit3.Text:=floattostr(c)
end else
Label1.Caption:='Proizvedenie chisel >50';
end;
procedure TForm21.Button3Click(Sender: TObject);
begin
close;
end;
end.
Вас заинтересует
2 года назад
2 года назад
7 лет назад
7 лет назад
10 лет назад