min = 2147483647;
max = -2147483648;
while True:
x = int(input());
if (x == 0):
break;
if (x < min):
min = x;
if (x > max):
max = x;
print(max);
print(min);
mi = 2147483647;
ma = -2147483648;
while x!=0:
if (x>ma):
ma=x
if (x < mi):
mi = x;
print(mi);
print(ma);
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
min = 2147483647;
max = -2147483648;
while True:
x = int(input());
if (x == 0):
break;
if (x < min):
min = x;
if (x > max):
max = x;
print(max);
print(min);
mi = 2147483647;
ma = -2147483648;
x = int(input());
while x!=0:
if (x>ma):
ma=x
if (x < mi):
mi = x;
x = int(input());
print(mi);
print(ma);