LCM (least common multiple)

please check my code for this problem

https://ide.codingblocks.com/s/95182 this is the url of the code

Hello @Ayushi21,
Your code seems to be working fine.

YEAH BUT IS THERE ANY OTHER METHOD BY WHICH THIS CODE CAN BE DONE

Yes, for two numbers a and b, we know that a*b is equal to gcd(a,b) * lcm(a,b).
So, you can first find gcd using Euclid’s Alogrithm(Euclid’s division lemma) and then use gcd to find lcm.