program MaxMinNumbers;
varnum, max, min: Integer;
beginWrite('Enter a number: ');Readln(num);
max := num;min := num;
while num <> 0 dobeginWrite('Enter a number: ');Readln(num);
end;
Writeln('Maximum number: ', max);Writeln('Minimum number: ', min);end.
program MaxMinNumbers;
var
num, max, min: Integer;
begin
Write('Enter a number: ');
Readln(num);
max := num;
min := num;
while num <> 0 do
if num > max thenbegin
Write('Enter a number: ');
Readln(num);
max := num;
if num < min then
min := num;
end;
Writeln('Maximum number: ', max);
Writeln('Minimum number: ', min);
end.