From f00f224f6798d82ebc6ea86413de2219766d8513 Mon Sep 17 00:00:00 2001 From: Morgan Cyrus Date: Wed, 19 Oct 2022 19:27:33 -0700 Subject: printResults function fixed --- CST116-Ch9-Debugging/CST116-Ch9-Debugging.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'CST116-Ch9-Debugging/CST116-Ch9-Debugging.cpp') 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"; -- cgit v1.2.3