Loops Lab 2 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; int main() { int num; << endl; cout << "Counting …" for (num = 0; num <= 5; num++) { cout << num << endl; } cout << of num << num << endl; “final value is “ return 0; } 1. Type in the above program as count.cpp. Add a comment to include your name and date. Compile and run. 2. Explain the final value of num. 3. Modify the program to count from 1 to 10 (rather than 0 to 5). Compile and run. 4. Submit the final program, output, and your answer to #2.
Loops Lab 2 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; int main() { int num; cout << "Counting …" << endl; for (num = 0; num <= 5; num++) { cout << num << endl; } cout << “final value of num is “ << num << endl; return 0; } 1. Type in the above program as count.cpp. Add a comment to include your name and date. Compile and run. 2. Explain the final value of num. 3. Modify the program to count from 1 to 10 (rather than 0 to 5). Compile and run. 4. Submit the final program, output, and your answer to #2.