Here i have writen the code to Find the Greates Common Divisor Using C

        

Saved the file with the extention c

#include int GCD(int a,int b) { if(b==0) { return a; } else { GCD(b,a% b); } } int main() { int n1,n2; printf("Enter two numbers:\n"); scanf("%d%d",&n1,&n2); printf("%d",GCD( n1, n2)); }

Press Ctrl + S to save.

Sample Input and Output:

            Input: Enter two integers: 56 98
            Output: GCD of 56 and 98 is: 14