aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnibal LopezBonilla <[email protected]>2022-10-04 10:36:52 -0700
committerAnibal LopezBonilla <[email protected]>2022-10-04 10:36:52 -0700
commit1e8571633b2e164b0bf371c427c3ddecc8a99594 (patch)
tree2bd9ae0a336a232f2c61cfea12364d0429a47ea6
parentTest (diff)
downloadcst116-lab0-debugging-buzzerbeaterclutch-1e8571633b2e164b0bf371c427c3ddecc8a99594.tar.xz
cst116-lab0-debugging-buzzerbeaterclutch-1e8571633b2e164b0bf371c427c3ddecc8a99594.zip
Added Pseudo Code file
-rw-r--r--CST116-Lab0-Debugging-Lopez-Bonilla/CST116-Lab0-Debugging-Lopez-Bonilla.cpp6
-rw-r--r--CST116-Lab0-Debugging-Lopez-Bonilla/Pseudo_Code_Lab0_Debugging_Lopez-Bonilla.txt20
2 files changed, 23 insertions, 3 deletions
diff --git a/CST116-Lab0-Debugging-Lopez-Bonilla/CST116-Lab0-Debugging-Lopez-Bonilla.cpp b/CST116-Lab0-Debugging-Lopez-Bonilla/CST116-Lab0-Debugging-Lopez-Bonilla.cpp
index 7c88669..28b15bf 100644
--- a/CST116-Lab0-Debugging-Lopez-Bonilla/CST116-Lab0-Debugging-Lopez-Bonilla.cpp
+++ b/CST116-Lab0-Debugging-Lopez-Bonilla/CST116-Lab0-Debugging-Lopez-Bonilla.cpp
@@ -75,10 +75,10 @@ int main()
cout << "Enter percent raise: ";
cin >> raise;
- money = money * raise;
+ //money = money * raise;
- //raise = money * raise;
- //money = money + raise;
+ raise = money * raise;
+ money = money + raise;
cout << "After your raise you have $";
cout << money << endl;
diff --git a/CST116-Lab0-Debugging-Lopez-Bonilla/Pseudo_Code_Lab0_Debugging_Lopez-Bonilla.txt b/CST116-Lab0-Debugging-Lopez-Bonilla/Pseudo_Code_Lab0_Debugging_Lopez-Bonilla.txt
new file mode 100644
index 0000000..3f1e383
--- /dev/null
+++ b/CST116-Lab0-Debugging-Lopez-Bonilla/Pseudo_Code_Lab0_Debugging_Lopez-Bonilla.txt
@@ -0,0 +1,20 @@
+Pseudo Code for Lab0-Debugging
+
+
+Program begins
+
+Create money variable which has a value of 123.45
+
+Create raise variable which is user inputs
+
+Creatw user prompt informing the user how much money they have earned before raise
+
+A user is prompted to input a percentage raise? EX. 10% = 0.10 OR .1
+
+A calculation is made for raise percentage input by user. r = m * r (raise = money * raise) EX. 12.34 = 123.45 * 0.1
+
+A new value for money is made based on output of raise calculation. m= m + r(money = money + raise) EX. 135.79 = 123.45 + 12.34
+
+User Prompt is made informing the user of the raise that they have earned based on the previous two calculation.
+
+Program ends