diff options
Diffstat (limited to 'CST116-Ch9-Debugging/CST116-Ch9-Debugging-Apetroaei.cpp')
| -rw-r--r-- | CST116-Ch9-Debugging/CST116-Ch9-Debugging-Apetroaei.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/CST116-Ch9-Debugging/CST116-Ch9-Debugging-Apetroaei.cpp b/CST116-Ch9-Debugging/CST116-Ch9-Debugging-Apetroaei.cpp index 7fce779..308eaf8 100644 --- a/CST116-Ch9-Debugging/CST116-Ch9-Debugging-Apetroaei.cpp +++ b/CST116-Ch9-Debugging/CST116-Ch9-Debugging-Apetroaei.cpp @@ -80,7 +80,7 @@ int main() // Breakpoint 1 // Put breakpoint on the following line - age = GetAge( ); + age = GetAge(); days = CalcDays( age); // Breakpoint 2 @@ -89,6 +89,14 @@ int main() return 0; } + +int GetAge() +int Calcdays(int years) +void PrintResults(int age, int days) +{ + cout << age << " ! Boy are you old!" << endl; + cout << " Did you know that you are at least " << days << " days old?" << endl; +} int GetAge() { int age; @@ -106,8 +114,4 @@ int CalcDays( int years) return days; } -void PrintResults(int age, int days) -{ - cout << age << " ! Boy are you old!\n"; - cout << " Did you know that you are at least " << days << " days old?\n\n"; -} + |