Цитата:
Сообщение от AlexZir
Условие задачи настолько сумбурное и нелогическое, что вряд ли вы без дополнительных разъяснений с вашей стороны сможете получить помощь.
|
Да не, Лёш, - можно. Думаю, имеется в виду что-нибудь в таком роде:
Код:
Var
Nmot,Ncar,i:Byte;
Sum_mot,Sum_car,Price:Real;
Begin
Write('Number of motorcycles = ');
Readln(Nmot);
Write('Number of cars = ');
Readln(Ncar);
Sum_mot:=0;
Sum_car:=0;
Writeln('Motorcycles:');
for i:=1 to Nmot do
begin
repeat
write('Next model price: ');
Readln(Price);
if Price>=5000 then writeln('Too expensive!!!');
until Price<5000;
Sum_mot:=Sum_mot+Price;
end;
writeln;
Writeln('Cars:');
for i:=1 to Ncar do
begin
repeat
write('Next model price: ');
Readln(Price);
if Price<=5000 then writeln('Too cheap!!!');
until Price>5000;
Sum_car:=Sum_car+Price;
end;
writeln;
Writeln(Sum_car/Ncar>Sum_mot/Nmot*3);
Readln
End.