#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
	int num1,num2,gcd,div,dd,r;
	clrscr();
	cout<<"\nEnter two numbers : ";
	cin>>num1>>num2;
	if(num1>num2)
	{
		dd=num1;
		div=num2;
	}
	else
	{
		dd=num2;
		div=num1;
	}
	do{
		r=dd%div;
		dd=div;
		div=r;
	}while(r!=0);
	gcd=dd;
	cout<<"\nGCD of the number is"<<"="<<gcd;
getch();
}
