aboutsummaryrefslogtreecommitdiff
path: root/CST116-Ch5-Debugging
diff options
context:
space:
mode:
authorAnibal LopezBonilla <[email protected]>2022-10-04 13:57:50 -0700
committerAnibal LopezBonilla <[email protected]>2022-10-04 13:57:50 -0700
commit42e1d90416aae4fc9cc0a9b847bf285bb92f2721 (patch)
treeafc4c76d033544f3583629eae26a9d3cb167cc81 /CST116-Ch5-Debugging
parentComment (diff)
downloadcst116-ch5-debugging-buzzerbeaterclutch-42e1d90416aae4fc9cc0a9b847bf285bb92f2721.tar.xz
cst116-ch5-debugging-buzzerbeaterclutch-42e1d90416aae4fc9cc0a9b847bf285bb92f2721.zip
Small details
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;