Advertisement
yiwen_akeni

program to find max prim of a number

Oct 24th, 2022 (edited)
1,424
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.18 KB | Source Code | 0 0
  1. # program to find max prim of a number
  2. x = int(input("write your number : "))
  3. i = x-1
  4. while i > 0:
  5.     if x % i == 0:
  6.         print("max prim is : " + str(i))
  7.         break
  8.     else:
  9.         i -= 1
  10.  
Tags: math python3 pyht
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement