From 74cb0543ad50ba847d9bf36f6065c542371422fa Mon Sep 17 00:00:00 2001 From: Taylor Rogers Date: Wed, 19 Oct 2022 08:40:56 -0700 Subject: Answered E3 Q6 --- CST116-Ch9-Debugging/CST116-Ch9-Debugging.cpp | 8 +++++++- 1 file changed, 7 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 f3d67a8..f116713 100644 --- a/CST116-Ch9-Debugging/CST116-Ch9-Debugging.cpp +++ b/CST116-Ch9-Debugging/CST116-Ch9-Debugging.cpp @@ -59,9 +59,15 @@ * 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. +* +* Confirmed +* * 4) Step into the PrintResults function. * 5) Age is 7300? Not even Ralph is that old. * 6) Why did the values for both variables change? +* +* void PrintResults(int days, int age) should have age listed first. I changed it to void PrintResults(int age, int days) and it works. +* * 7) Stop debugging and fix the error. * * Debugging Exercise 4 @@ -120,7 +126,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