#include<stdio.h>
int main()
{
    int x , y , i , gcd , k;

    printf(" Enter the first number : ");
    scanf("%d", &x);

    printf(" Enter the second number : ");
    scanf("%d", &y);

    for( i =1 ; i <=x && i <=y ; i++)
    {
        if( x%i==0 && y%i==0)
            gcd = i;
    }

    printf("The gcd of %d and %d is %d ", x,y,gcd);
    return 0;
}



OUTPUT :


For Other Programs Visit The WebSite:-   https://www.techapurba.com/

Follow Me On Social Media :-


For tech related videos visit my other website :- https://apurbatechinfo.blogspot.com/