A Program That Read Two numbers & Display GCD (Greatest Common Divisor).

#include<stdio.h>
#include<conio.h>

void main()
{
    int a,b,c;
    clrscr();
    printf("Enter 1st number = ");
    scanf("%d",&a);
    printf("Enter 2nd number = ");
    scanf("%d",&b);
   
    while(a%b!=0)
    {
       c=a%b;
       a=b;
       b=c;
    }
   
    printf("Greatest Common Divisor(GCD) = %d",b);

    getch();
}

///////////////////////////////////////////////////////////////////////////
Copy & paste this code in your TC & run, then you will get output.......
If you have any problem please comment below.........