Any help is appreciated.
/* Euclidean.cpp
Writing the Euclidean algorithm using C++.
10-29-06
Lab 7
*/
#include<iostream>
using namespace std;
int gcd( int & a, int & b, int & c);
int main(){
int a, b, c;
cout << "Enter the first number: ";
cin >> a;
cout << "Enter the second number: ";
cin >> b;
return gcd;
}
int gcd( int & a, int & b, int & c){
if (b = 0){
b = a;
}
else{
a = b;
c = a % b;
b = c;
}
return a/c;
}
Output results:
1>------ Build started: Project: Lab7, Configuration: Debug Win32 ------
1>Compiling...
1>Euclidean.cpp
1>c:\comp128\lab7\lab7\euclidean.cpp(20) : error C2440: 'return' : cannot convert from 'int (__cdecl *)(int &,int &,int &)' to 'int'
1> There is no context in which this conversion is possible
1>Build log was saved at "file://c:\Comp128\Lab7\Lab7\Debug\BuildLog.htm"
1>Lab7 - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========











