Evening Everyone:
I'm a bit of a newie with C++, and can't determine where to "declare" the functions in the following code. The compiler is stating I haven't defined the functions, but I've followed the instructors directions, and am now stuck. YAY! Thanks so much!
#include <iostream>
using namespace std;
int main( ) // calls readmiles & calcKM
{
int numMiles = 0;
double distKilo = 0.0;
numMiles = readmiles( );
calcKM(numMiles);
cout << "Total miles in kilometers is : " << distKilo << endl;
system("pause");
return 0;
}
int readmiles( ) //inputs number of miles
{
cout <<"Enter number of miles: ";
cin >> numMiles;
return numMiles;
}
double calcKM(int numMiles) // calculates miles into kilometers
{
distKilo = numMiles * 1.67;
return distKilo;
}