HERE IS MY LITTLE POWERFUL CODE TO FIND GCD EASILY | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

HERE IS MY LITTLE POWERFUL CODE TO FIND GCD EASILY

I think its simple code but it can find the gcd of two given numbers, beside that it also displayed to the screen how you can manually find it. https://code.sololearn.com/cBxoSLFQzEzf/#cpp any suggestions will be appreciated.

29th Jun 2017, 2:13 AM
Nura Programmer
Nura Programmer - avatar
5 Answers
+ 4
I did not understand what's your initial question... and not enough usually using C++ to study your code, but principles explained and implemented in my related codes could maybe help you ^^
29th Jun 2017, 2:20 AM
visph
visph - avatar
29th Jun 2017, 2:05 AM
visph
visph - avatar
0
Visph, Did you get some suggestions for me to take correction?
29th Jun 2017, 2:10 AM
Nura Programmer
Nura Programmer - avatar
0
Thnks @visph
29th Jun 2017, 2:52 AM
Nura Programmer
Nura Programmer - avatar
- 1
the recursion is unnecessary. use a loop or use a recursive GCD calculation method. this is an abuse of recursion. syntactically correct though.
29th Jun 2017, 6:22 AM
Venkatesh Pitta
Venkatesh Pitta - avatar