aboutsummaryrefslogtreecommitdiff
path: root/CST116-Ch5-Debugging
diff options
context:
space:
mode:
Diffstat (limited to 'CST116-Ch5-Debugging')
-rw-r--r--CST116-Ch5-Debugging/CST116-Ch5-Lopez-Bonilla.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/CST116-Ch5-Debugging/CST116-Ch5-Lopez-Bonilla.cpp b/CST116-Ch5-Debugging/CST116-Ch5-Lopez-Bonilla.cpp
index b2f8c06..38a6c87 100644
--- a/CST116-Ch5-Debugging/CST116-Ch5-Lopez-Bonilla.cpp
+++ b/CST116-Ch5-Debugging/CST116-Ch5-Lopez-Bonilla.cpp
@@ -46,7 +46,7 @@
*
* Correct Code
* raise = money * raise;
-* money = money + raise
+* money = money + raise;
*
* Debugging Exercise 3
*
@@ -69,19 +69,24 @@ using std::endl;
int main()
{
+ //Money and raise variable is introduced
float money = 123.45F;
float raise;
+ //User is informed of the current amount of money.
cout << "You have $";
cout << money << endl;
// Breakpoint 1
// Put a breakpoint on the following line
+
+ //User inputs the percentage raise
cout << "Enter percent raise: ";
cin >> raise;
- money = money * raise;
-
+ //money = money * raise;
+ raise = money * raise;
+ money = money + raise;
cout << "After your raise you have $";
cout << money << endl;