gcd2-SiGFPE

hello,i was doing this question but even after many trials i am getting this SIGFPE error.Can anybody help me. Solution Thanks.

This is the easiest runtime error to debug - it is a floating point error. It is virtually always caused by a division by 0, so check any divisions or modulo operations in your code carefully.