aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnibal LopezBonilla <[email protected]>2022-10-04 13:21:58 -0700
committerAnibal LopezBonilla <[email protected]>2022-10-04 13:21:58 -0700
commit0595b2abc5c4d0c7d0f3e4b80961e45d99b26cbb (patch)
tree2ea985b5b2a82e98aa2eb97350d3777459d89881
parentRenamed and code is corrected Double check (diff)
downloadcst116-ch5-debugging-buzzerbeaterclutch-0595b2abc5c4d0c7d0f3e4b80961e45d99b26cbb.tar.xz
cst116-ch5-debugging-buzzerbeaterclutch-0595b2abc5c4d0c7d0f3e4b80961e45d99b26cbb.zip
Added comments to cpp file
-rw-r--r--CST116-Ch5-Lopez-Bonilla/CST116-Ch5-Lopez-Bonilla.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/CST116-Ch5-Lopez-Bonilla/CST116-Ch5-Lopez-Bonilla.cpp b/CST116-Ch5-Lopez-Bonilla/CST116-Ch5-Lopez-Bonilla.cpp
index e06c071..0c84a7b 100644
--- a/CST116-Ch5-Lopez-Bonilla/CST116-Ch5-Lopez-Bonilla.cpp
+++ b/CST116-Ch5-Lopez-Bonilla/CST116-Ch5-Lopez-Bonilla.cpp
@@ -63,28 +63,36 @@
#include <iostream>
#include <iomanip>
+
using std::cout;
using std::cin;
using std::endl;
int main()
{
+ //Programs begins
+ //Money and raise variable are created
float money = 123.45F;
float raise;
+ //User is informed of how much money they have
cout << "You have $";
cout << money << endl;
// Breakpoint 1
// Put a breakpoint on the following line
+
+ //User enter raise percentage.
cout << "Enter percent raise: ";
cin >> raise;
//money = money * raise;
+ //Calculations to the raise and amount of money after raise has been calculated.
raise = money * raise;
money = money + raise;
+ //user is informed of calculation results
cout << "After your raise you have $";
cout << money << endl;