Matuiss2

highest number, using just while

Sep 20th, 2017
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.28 KB | None | 0 0
  1. # Entrada
  2. numeros = int(input("Type how many numbers will be on the list"))
  3. maior = 0
  4. # Processo
  5. while numeros != 0:
  6.     numeros -= 1
  7.     inteiros = int(input("Type an exact number:"))
  8.     if inteiros > maior:
  9.         maior = inteiros
  10. # Saída
  11. print("The highest number is", maior)
Advertisement
Add Comment
Please, Sign In to add comment