-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathGCD.c
More file actions
21 lines (15 loc) · 665 Bytes
/
GCD.c
File metadata and controls
21 lines (15 loc) · 665 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include<stdio.h>
int main()
{
int m,n,r=1;
printf("\nEnter Value For m,n");
scanf("%d,%d",&m,&n);
while(r!=0)
{
r=n%m;
n=m;
m=r;
}
printf("\nGCD=%d\n",n);
return 0;
}