+ 1
please help me to write a c++ program to find the LCM of 2 integer positive number using function named 'Laghu'.
well you can give the logics what you have used and how it works on inputting the values(pathways) please help
1 Answer
0
Int adad1,adad2,temp,c,i = a*b;
cin >> adad1 >> adad2;
If (adad2 > adad1){
temp = adad1;
adad1 = adad2;
adad2 = temp;
} // after this if : adad1>adad2
while (i >= adad2)
If (a % i == 0 && b % i == 0)
c = i;
i --;}