diff options
Diffstat (limited to 'CST116-Ch7-Debugging')
| -rw-r--r-- | CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp b/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp index 80e5ea1..1294752 100644 --- a/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp +++ b/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp @@ -70,16 +70,23 @@ int main() // Breakpoint 1
// Put a breakpoint on the following line
+
+ //if statements depending on the age entered by the user.
+ //Age 1 = Baby
if (age == 1)
cout << "First Birthday" << endl;
+ //Age 12-19 = Teenager
else if (age >= 12 && age <= 19)
cout << "Teenager" << endl;
+ //Age 2-11 = Child
else if (age < 12)
cout << "Child" << endl;
+ //Age 62 and above = Senior
else if (age > 62)
cout << "Senior" << endl;
// Breakpoint 2
// Put a breakpoint on the following line
+ //Age 21-61 = Adult
else
cout << "Adult" << endl;
|