aboutsummaryrefslogtreecommitdiff
path: root/Ch 5 Debugging Project/Ch 5 Debugging Project.cpp
diff options
context:
space:
mode:
authorprestonderek <[email protected]>2022-10-01 21:10:14 -0700
committerprestonderek <[email protected]>2022-10-01 21:10:14 -0700
commitfde16d3ac69167be24b5ed75a1fc61dd38e87b09 (patch)
treefc93a721e46ce9bc6a83659e44a2408cac7005a5 /Ch 5 Debugging Project/Ch 5 Debugging Project.cpp
parentCommit at 19:31 for save (diff)
downloadcst116-lab0-debugging-prestonderek-fde16d3ac69167be24b5ed75a1fc61dd38e87b09.tar.xz
cst116-lab0-debugging-prestonderek-fde16d3ac69167be24b5ed75a1fc61dd38e87b09.zip
Commit for the addition of While loop
Diffstat (limited to 'Ch 5 Debugging Project/Ch 5 Debugging Project.cpp')
-rw-r--r--Ch 5 Debugging Project/Ch 5 Debugging Project.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/Ch 5 Debugging Project/Ch 5 Debugging Project.cpp b/Ch 5 Debugging Project/Ch 5 Debugging Project.cpp
index 04475bd..f5e6e86 100644
--- a/Ch 5 Debugging Project/Ch 5 Debugging Project.cpp
+++ b/Ch 5 Debugging Project/Ch 5 Debugging Project.cpp
@@ -75,10 +75,11 @@ int main()
// Put a breakpoint on the following line
cout << "Enter percent raise above 1.0%: "; //Inserted breakpoint for step 1. //Added a rule for the users entered value to stop the raise from being below 1.0%
cin >> raise;
- while (raise <= 1.0)
+ while (raise <= 1.0) //I added this while loop to combat the issue of inserting a raise that either keeps the money at the current value or decreases it. This was for step 9 Debug 2
{
- cout << "You must enter a number greater than 1.0";
- cin >> "Enter percent raise above 1.0%";
+ cout << "You must enter a number greater than 1.0" << endl;
+ cout << "Enter percent raise above 1.0%: ";
+ cin >> raise;
}
money = money * raise;