#include <iostream>
usingnamespace std;
// CalculateMaximum.cpp
int main()
{
// prototype
int findMax(int, int); // the function declaration (prototype)
int firstnum;
int secnum;
int maxNumber = 0;
cout << "\nEnter a number: ";
cin >> firstnum;
cout << "Great! Please enter a second number: ";
cin >> secnum;
// function call
maxNumber = findMax(firstnum, secnum); // the function is called here
cout << "\nThe maximum of the two numbers is "
<< maxNumber << endl;
cin.get();
return 0;
}
//-------------------------------------------------------------------
// Output Function - code the findMax() function below
//-------------------------------------------------------------------
Would the Output Function look something like this..??
You could use an
if-else anyway;
the function procedure
finishes when
an integer is returned
so: if a is greater than b
a is returned or
if a is equal or less
than b; b is returned;