diff options
| -rw-r--r-- | CST116-Ch5-Lopez-Bonilla/CST116-Ch5-Lopez-Bonilla.cpp | 8 |
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; |