From cf82bbd4f5cee0ad0dd71aca77d504296d65ea6b Mon Sep 17 00:00:00 2001 From: Tim Pearse Date: Wed, 12 Oct 2022 16:28:21 -0700 Subject: Change 1: The debugging, output, and pseudocode. --- CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp') diff --git a/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp b/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp index f64adfe..bc89e29 100644 --- a/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp +++ b/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp @@ -56,9 +56,9 @@ int main() // Breakpoint 1 // Put a breakpoint on the following line - if (age = 1) + if (age == 1) cout << "First Birthday" << endl; - else if (age >= 12 || age <= 19) + else if (age >= 12 && age <= 19) cout << "Teenager" << endl; else if (age < 12) cout << "Child" << endl; @@ -66,8 +66,9 @@ int main() cout << "Senior" << endl; // Breakpoint 2 // Put a breakpoint on the following line - else; - cout << "Adult" << endl; + else { + cout << "Adult" << endl; + } return 0; } \ No newline at end of file -- cgit v1.2.3