[Solved] C++ code include error [closed]


You included conio not conio.h you werent declaring std:: or using namespace std and one of your couts was just out. You may want to post the errors you get in the future and format your code.

#include<iostream>
#include<conio.h>
long gcd(long,long);

using namespace std;
int main()
{
    int m,n;
    cout<<"enter the  1st integer =";
    cin>>m;
    cout<<"enter the  2nd integer =";
    cin>>n;
    cout<<"gcd("<<m<<" "<<n<<" )\n=";
    cout<<gcd(m,n)<<endl;
    getch();
}
long gcd(long m,long n){
    while(n!=0){
        long r=m%n;
        m=n;
        n=r;
    }
    return m;
}

2

solved C++ code include error [closed]