Write c++ program to calculate greatest common divisor GCD of any two number | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Write c++ program to calculate greatest common divisor GCD of any two number

loop

30th Mar 2017, 6:18 PM
Bts...
Bts... - avatar
3 Answers
+ 2
I don't understand code
30th Mar 2017, 6:58 PM
Bts...
Bts... - avatar
+ 1
I've commented out the conditional ternary operator and rewritten it using if/else statement... Hope that helps...Lemme know if you still need assistance...
30th Mar 2017, 7:05 PM
wmik
0
Hi... Here's an example using recursion and C++... https://code.sololearn.com/cyIux72t6PYX/?ref=app Happy coding!!!
30th Mar 2017, 6:32 PM
wmik