/* http://native-code.blogspot.com */ /* GCD_nativecode */ #include<stdio.h> #include<conio.h> int gcd(int m,int n) { if(m>=n && (m% n) == 0) return n; else return(n,m%n); } void main() { int m,n; printf("/* http://native-code.blogspot.com */\n\n enter m and n: "); scanf("%d%d",&m,&n); printf("\n gcd is=%d",gcd(m,n)); getch(); }
Post a Comment