Matuiss2

Failed-finding the LCM, program

Sep 13th, 2017
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.27 KB | None | 0 0
  1. num1 = int(input("Digite um número inteiro:"))
  2. num2 = int(input("Digite outro número inteiro:"))
  3.  
  4. if num1 > num2:
  5.     maior = num1
  6. else:
  7.     maior = num2
  8. while True:
  9.     if maior % num1 == 0 and maior % num2 == 0:
  10.         print(maior)
  11.     else:
  12.         maior += 1
Advertisement
Add Comment
Please, Sign In to add comment