Программа:
var a,b,c,min,max: integer;
begin
write('a, b, c: ');
readln(a,b,c);
if a>b then max:=a else max:=b;
if c>max then max:=c;
if a<b then min:=a else min:=b;
if c<min then max:=c;
writeln('max = ',max,' min = ',min,' max/min = ',max/min:5:2);
end.
Пример:
a, b, c: 5 2 10
max = 10 min = 2 max/min = 5.00
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Verified answer
Программа:
var a,b,c,min,max: integer;
begin
write('a, b, c: ');
readln(a,b,c);
if a>b then max:=a else max:=b;
if c>max then max:=c;
if a<b then min:=a else min:=b;
if c<min then max:=c;
writeln('max = ',max,' min = ',min,' max/min = ',max/min:5:2);
end.
Пример:
a, b, c: 5 2 10
max = 10 min = 2 max/min = 5.00