#include<stdio.h>
int main() 
{
int copy_num_1,copy_num_2,num_1,num_2,gcd,i ;
printf("Please, Enter two numbers : "); 
scanf("%d%d",&num_1,&num_2); 
copy_num_1=num_1; 
copy_num_2=num_2; 
//copying numbers , (entered by user) for future use. 
if(num_1<0) 
num_1=(num_1)*(-1);
if(num_2<0) 
num_2=(num_2)*(-1);
//here, we are converting negative numbers(if any, entered by user), so that, we can calculate the gcd for both positive and negative numbers.
for(i=1;i<=num_1 && i<=num_2;i++)
{
if(num_1%i==0 && num_2%i==0) 
gcd=i; 
}
printf("\nThe GCD of %d and %d is : %d",copy_num_1,copy_num_2,gcd); 
return 0;
} 