Напечатать таблицу стоимости 50, 100, 150, .... 1000 г сыра. Стоимость 1 кг вводится с клавиатуры
program seee;uses crt;var p,b,c:real; i,v:integer;beginclrscr;readln(p);writeln;writeln('mass price ');writeln;while v<>1000 dobegin v:=v+50; writeln(v,'g ',v*p/1000:2:2);end;readkey;end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
program seee;
uses crt;
var p,b,c:real;
i,v:integer;
begin
clrscr;
readln(p);
writeln;
writeln('mass price ');
writeln;
while v<>1000 do
begin
v:=v+50;
writeln(v,'g ',v*p/1000:2:2);
end;
readkey;
end.