Matuiss2

lowest number, using just while

Sep 20th, 2017
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.46 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.     menor = maior
  11.     while numeros != 0:
  12.         numeros -= 1
  13.         inteiros = int(input("Type an exact number:"))
  14.         if inteiros < menor:
  15.             menor = inteiros
  16. #SaĆ­da
  17. print("The lowest number is", menor)
Advertisement
Add Comment
Please, Sign In to add comment