#include <iostream>
#include <cmath>
using namespace std;
// our prototype for the welcome function would go here
void welcomeUser();
// our prototype for the get user data function would go here
// our prototype for the calculation function would go here
// our prototype for the final display function would go here
int main()
{
// declare our constant for the maximum user value
const long MaxUserVal = 2047;
// declare variables for the data value we'll process
// and for the calculated result
long val2process, calcResult;
// call the welcome function (no paramters required)
welcomeUser();
// call the function to get user data, passing our constant as the parameter
// and storing the return value in our variable for the data to process
// call the function to do the calculation, passing the variable for the
// data to process and storing the return value in the variable for
// the calculated result
// call the final display function, passing both variables
}
// our implementation of the welcome function would go here
void welcomeUser()
{
cout << "Welcome to lab exercise 2" << endl;
cout << "This program ... blah blah blah ..." << endl;
}
// our implementation of the get user data function would go here
// our implementation of the calculation function would go here
// our implementation of the final display function would go here
|