source code:123456789101112131415161718192021#include #include#includeusing namespace std; int main(){cout<<"Enter two numbers to find their greatest common divisor : "<int a,b ,i=1,ans;cin>>a>>b;cout<<"\n\n\n\n\n"; while(i{ if((a%i==0)&&(b%i==0)) ans=i; i++;}cout<<"GCD is "<getch();}