diff options
Diffstat (limited to 'Ch 5 Debugging Project')
| -rw-r--r-- | Ch 5 Debugging Project/Ch 5 Debugging Project.cpp | 8 | ||||
| -rw-r--r-- | Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.exe | bin | 53760 -> 53760 bytes | |||
| -rw-r--r-- | Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.ilk | bin | 548584 -> 576328 bytes | |||
| -rw-r--r-- | Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.obj | bin | 82711 -> 83581 bytes | |||
| -rw-r--r-- | Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.pdb | bin | 2330624 -> 2445312 bytes |
5 files changed, 7 insertions, 1 deletions
diff --git a/Ch 5 Debugging Project/Ch 5 Debugging Project.cpp b/Ch 5 Debugging Project/Ch 5 Debugging Project.cpp index 0f43db8..400970b 100644 --- a/Ch 5 Debugging Project/Ch 5 Debugging Project.cpp +++ b/Ch 5 Debugging Project/Ch 5 Debugging Project.cpp @@ -86,6 +86,9 @@ *
* 9) What happened to our money? I thought a raise was supposed
* to increase our money? Stop debugging and fix the calculation.
+* It asks for a % raise, though we entered .1
+* It then multiplies by that number which shows us one tenth of the value of our money, rather than applying a 10% raise.
+*
*/
/* Debugging Exercise 3
@@ -117,9 +120,12 @@ int main() // Breakpoint 1
// Put a breakpoint on the following line
- cout << "Enter percent raise: ";
+ cout << "Enter percent raise as a whole number: ";
cin >> raise;
+ cout << "You have entered: " << raise << "%\n";
+ raise = 1 + (raise / 100);
+
money = money * raise;
cout << "After your raise you have $";
diff --git a/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.exe b/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.exe Binary files differindex 2aebc04..9e43520 100644 --- a/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.exe +++ b/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.exe diff --git a/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.ilk b/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.ilk Binary files differindex 09d2574..7537ff4 100644 --- a/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.ilk +++ b/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.ilk diff --git a/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.obj b/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.obj Binary files differindex 1cebfa1..68184ec 100644 --- a/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.obj +++ b/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.obj diff --git a/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.pdb b/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.pdb Binary files differindex 743653d..70d9e5f 100644 --- a/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.pdb +++ b/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.pdb |