diff options
| author | Anibal LopezBonilla <[email protected]> | 2022-10-12 22:19:03 -0700 |
|---|---|---|
| committer | Anibal LopezBonilla <[email protected]> | 2022-10-12 22:19:03 -0700 |
| commit | 2b2654146e4cf3975ac2e683da1dfa3cc5ae3c8f (patch) | |
| tree | af9e35e75b293022f0d4c1e716f98fa2b60fdc94 | |
| parent | Added Pseudocode File Push 7 (diff) | |
| download | cst116-ch7-debugging-lopez-bonilla-2b2654146e4cf3975ac2e683da1dfa3cc5ae3c8f.tar.xz cst116-ch7-debugging-lopez-bonilla-2b2654146e4cf3975ac2e683da1dfa3cc5ae3c8f.zip | |
| -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;
|