If you can suggest some more short form for this particular code, kindly do suggest! | SoloLearn: Learn to code for FREE!

+1

If you can suggest some more short form for this particular code, kindly do suggest!

https://code.sololearn.com/cev0tVRcP6eG/?ref=app

5/14/2020 4:44:51 PM

Shreyas Kumar

1 Answer

New Answer

+1

Your logic is correct but not the code.... If you are trying recursive approch.... Then, Look at this, https://code.sololearn.com/cssuK09eoihG/?ref=app Your have following problem, 1) main function have return type int, then you should return 0, if you are returning any other value then it is redundant unless you are working on comlex application..... 2) your code do not handle case where b > a.... 3) gcd have return type int, so it should return some value to main, or it will warning.....