diff options
| author | Morgan Cyrus <[email protected]> | 2022-10-19 19:27:33 -0700 |
|---|---|---|
| committer | Morgan Cyrus <[email protected]> | 2022-10-19 19:27:33 -0700 |
| commit | f00f224f6798d82ebc6ea86413de2219766d8513 (patch) | |
| tree | 33c8cf2f281857ebf0415843ecd48b244568c2b8 /CST116-Ch9-Debugging/CST116-Ch9-Debugging.cpp | |
| parent | Exercise 2 complete (diff) | |
| download | cst116-ch9-debugging-radioflyer32-f00f224f6798d82ebc6ea86413de2219766d8513.tar.xz cst116-ch9-debugging-radioflyer32-f00f224f6798d82ebc6ea86413de2219766d8513.zip | |
printResults function fixed
Diffstat (limited to 'CST116-Ch9-Debugging/CST116-Ch9-Debugging.cpp')
| -rw-r--r-- | CST116-Ch9-Debugging/CST116-Ch9-Debugging.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/CST116-Ch9-Debugging/CST116-Ch9-Debugging.cpp b/CST116-Ch9-Debugging/CST116-Ch9-Debugging.cpp index 01ca7c2..b79ea82 100644 --- a/CST116-Ch9-Debugging/CST116-Ch9-Debugging.cpp +++ b/CST116-Ch9-Debugging/CST116-Ch9-Debugging.cpp @@ -76,10 +76,19 @@ * 2) When asked, enter the value of 20 for your age.
* 3) Verify that the variable age is 20 and the variable days
* is 7300.
+* done
+*
* 4) Step into the PrintResults function.
+* done
+*
* 5) Age is 7300? Not even Ralph is that old.
+* done
+*
* 6) Why did the values for both variables change?
+* the variables being passed are reversed
+*
* 7) Stop debugging and fix the error.
+* done
*
*/
@@ -141,7 +150,7 @@ int CalcDays(int years) return days;
}
-void PrintResults(int days, int age)
+void PrintResults(int age, int days)
{
cout << age << "! Boy are you old!\n";
cout << "Did you know that you are at least " << days << " days old?\n\n";
|