самое большое число — 2456
наименьшее число — 35
В Python
Код: Выделить всё
a = input()
first = int(a)
b = input()
second = int(b)
c = input()
third = int(c)
d = input()
fourth = int(d)
if a > b or a > c or a > d:
print ('the larges number' + a)
elif a < b or a < c or a < d:
print ('the smallest number' +a )
elif b > a or b > c or b > d:
print ('the larges number' + b)
elif b < a or b < c or b < d:
print ('the smallest number is' + b )
elif d > a or d > b or d > c:
print ('the biggest number is' + d )
elif d < a or d < b or d < c:
print ('the smallest numbet is'+ d)
else:
числа, и при этом выводятся самые большие
из этих чисел и самые маленькие из этих чисел.
В моем справочнике модулей есть этот пример
Код: Выделить всё
num = 0
while num < 100:
num = num + 5
print(str(num))
print(’Done looping!’)
Мне нужно решить вопрос с помощью циклов while.
Я новичок в программировании, пожалуйста, помогите.
Подробнее здесь: https://stackoverflow.com/questions/438 ... puts-the-l
Мобильная версия