Function Lab1

Type in Word. Work with a partner and submit ONE COPY per pair. Include the following at the top of your submission:

 

Partner 1:       Name ______________________________________________

role (driver or navigator) _____________________________

 

Partner 2:       Name ______________________________________________

role (driver or navigator)______________________________

 

Please note if one partner did not work on all problems:

 

---------------------------------------------------------------------------------------------------

#include <iostream>

using namespace std;

//prototypes

void DemonstrateProc1();

void DemonstrateProc2(int num);

int main()

{

cout << "?. Execution starts with main. " << endl;

DemonstrateProc1();

      cout << "?. Then we come here. " << endl;

      DemonstrateProc2(100);

      cout << "?. Finally we come here. "<< endl;

      return 0;

}

//****************************

void DemonstrateProc1()

{

      cout << "?. This is a sample procedure." << endl;

}

//****************************

void DemonstrateProc2(int num)

{

      cout << "?. This is another sample procedure. " << endl;

      cout << "   num is an argument or parameter. " << endl;

      cout << "   The value of num is " << num << endl;

}

 

     

  1. Type in the above program including your name and date as a comment. Before running the program, change each of the question marks to the numbers 1 through 5 indicating the order in which that line will be executed. Run the program and check your numbers. Fix and rerun if necessary. Submit the program and the output.