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 |