Friends, i have written a code for finding HCF but it does not work. please help me in improving this code.Thanks in advance.
#include<iostream>
using namespace std;
int main ()
{
int a,b,c,d,e,f,g,h;
cout<<"Please input two nnumbers:"<<endl;
cin>>a;
cin>>b;
d=a%b;
c=(a-d)/b;
a=b*c+d;
if d==o
cout<<"The hcf is:"<<b<<endl;
if d>>0
{
f=b%d;
e=(b-f)/d;
b=d*e+f;
if f==0
cout<<"The hcf is:"<<d,,endl;
if f>>0
{
h=d%f;
g=(d-h)/f;
d=f*g+h;
if h==0
cout<<"The hcf is:"<<f<<endl;
if h>>0
cout<<"The Hcf could not be found out due to the some problems";
}
}
return 0;
}