From ec7f765cc512d0b66533ed476ce2da202d16bdc2 Mon Sep 17 00:00:00 2001 From: Hannah Wu Date: Tue, 11 Oct 2022 23:09:36 -0700 Subject: Updates --- CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 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..75cfd49 100644 --- a/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp +++ b/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp @@ -56,17 +56,17 @@ 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) + else if (age <= 12 && age >= 1) cout << "Child" << endl; - else if (age > 62) + else if (age >= 62) cout << "Senior" << endl; // Breakpoint 2 // Put a breakpoint on the following line - else; + else if (age >=18 && age <= 62) cout << "Adult" << endl; return 0; -- cgit v1.2.3