Skip to content

Instantly share code, notes, and snippets.

@TreavVasu
Last active October 25, 2016 13:47
Show Gist options
  • Select an option

  • Save TreavVasu/b703a653f689e63d802ac94722283682 to your computer and use it in GitHub Desktop.

Select an option

Save TreavVasu/b703a653f689e63d802ac94722283682 to your computer and use it in GitHub Desktop.
Easy One I designed it by myself for my school exams hope Helps Everyone
Dont Forget to thanks πŸ˜† πŸ˜‰ πŸ˜ƒ πŸ˜ƒ πŸ˜ƒ

##Follow facebook.com/versatile.vasu ##Follow @vasusoniat1

x=input("no=")
y=input("no=")
gcd=0
m=1
k=0
if x>y:
for c in range(y,0,-1):
if y%c==0 and x%c==0:
m=m*c
else:
for c in range(x,0,-1):
if y%c==0 and x%c==0:
m=m*c
gcd=m
print "gcd",gcd
k=x*y
Lcm=k/gcd
print "Lcm=",Lcm
##Follow facebook.com/versatile.vasu
##Follow @vasusoniat1
@TreavVasu
Copy link
Author

Easy One I designed it by myself for my school exams hope Helps Everyone
Dont Forget to thanks πŸ˜† πŸ˜‰ πŸ˜ƒ πŸ˜ƒ πŸ˜ƒ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment