num1 = 12
      num2 = 14
      for i in range(max(num1, num2), 1 + (num1 * num2)):
          if i % num1 == i % num2 == 0:
              lcm = i
              break
      print("LCM of", num1, "and", num2, "is", lcm)
      
      Python language logo

      LCM Of Two Numbers

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.