Could anyone tell me why I am getting such weird numbers passed to my function?
Here is the code.
#include <iostream>
#include <stdio.h>
using namespace std;
int LCF(int m, int n);
int main( )
{
int m; int n;
cout << endl;
cout <<"Enter the smallest integer";
cin >> m;
cout <<"Enter the greatest integer: ";
cin >> n ;
cout << "m = " << m << endl <<"n = " << n << endl;
if( n >= m ){
cout <<"GOOD JOB! You followed directions!";
}
else{
cout <<"You DID NOT follow directions" << endl;
}
cout << endl;
LCF(m,n);
return 0;
}
int LCF( int, int )
{
int m; int n;
cout << endl;
cout << "m = " << m << endl <<"n = " << n << endl;
Eventually I am going to return something. I just stripped it down to make it easier to understand my problem. It's just been over a year since I did anything in C, and I haven't learned C++ yet, so I am just trying to do some basic things to refresh my memory of C, so I can start learning C++. I appreciate your help. Thank you..