Hello! im trying to make programm with while loop.
I need to enter three integers and i cant get it to output me greatest common divisor.
maybe someone can help finding my mistake ?
void main()
{
int x,y,z;
int d;
cout<<"input first - ";
cin>>x;
cout<<"input second - ";
cin>>y;
cout<<"input third number - ";
cin>>z;
d=0;
do{
d=d+1;
}while((x/d)||(y/d)||(z/d));
cout<<"GCD is "<<d<<" ";