Advertisement
Maszi

Najmniejsza i największa liczba z podanych

Dec 1st, 2019
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.26 KB | None | 0 0
  1. a = int(input("Podaj liczbę: "))
  2. max = a
  3. min = a
  4. while a != 0:
  5.     if a > max:
  6.         max = a
  7.     if a < max:
  8.         min = a
  9.     a = int(input("Podaj liczbę: "))
  10. print("Największą liczbą jest: " + str(max) + "\nNajmniejszą liczbą jest: " + str(min))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement