aboutsummaryrefslogtreecommitdiff
path: root/CST116-Ch9-Debugging
diff options
context:
space:
mode:
Diffstat (limited to 'CST116-Ch9-Debugging')
-rw-r--r--CST116-Ch9-Debugging/CST116-Ch9-Havaldar.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/CST116-Ch9-Debugging/CST116-Ch9-Havaldar.cpp b/CST116-Ch9-Debugging/CST116-Ch9-Havaldar.cpp
index 3c029bc..af98762 100644
--- a/CST116-Ch9-Debugging/CST116-Ch9-Havaldar.cpp
+++ b/CST116-Ch9-Debugging/CST116-Ch9-Havaldar.cpp
@@ -75,15 +75,15 @@ const int DAYS_PER_YEAR = 365;
int GetAge();
int CalcDays(int age);
void PrintResults(int age, int days);
-int age = 0;
-int days = 0;
int main()
{
+ int age = 0;
+ int days = 0;
// Breakpoint 1
// Put breakpoint on the following line
- GetAge();
+ age = GetAge();
days = CalcDays(age);
// Breakpoint 2
@@ -94,7 +94,8 @@ int main()
}
int GetAge()
{
-
+ int age;
+
cout << "Please enter your age: ";
cin >> age;