program FindMinMax; var a, b, c, min, max: real; begin write('Enter the first number: '); readln(a); write('Enter the second number: '); readln(b); write('Enter the third number: '); readln(c);
if (a > b) and (a > c) then max := a else if (b > a) and (b > c) then max := b else max := c;
if (a < b) and (a < c) then min := a else if (b < a) and (b < c) then min := b else min := c;
writeln('Maximum value is: ', max:0:2); writeln('Minimum value is: ', min:0:2); end.
program FindMinMax;
var
a, b, c, min, max: real;
begin
write('Enter the first number: ');
readln(a);
write('Enter the second number: ');
readln(b);
write('Enter the third number: ');
readln(c);
if (a > b) and (a > c) then
max := a
else if (b > a) and (b > c) then
max := b
else
max := c;
if (a < b) and (a < c) then
min := a
else if (b < a) and (b < c) then
min := b
else
min := c;
writeln('Maximum value is: ', max:0:2);
writeln('Minimum value is: ', min:0:2);
end.