Даны три числа. Если их произведение меньше 50, то числа увеличить в 10 раз. Составить программу в Delphi
Ответы на вопрос
Ответил Madina171185
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;
Ответил Nurzhass
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 года назад
Математика,
9 лет назад
Алгебра,
9 лет назад
Алгебра,
10 лет назад