From 0595b2abc5c4d0c7d0f3e4b80961e45d99b26cbb Mon Sep 17 00:00:00 2001 From: Anibal LopezBonilla Date: Tue, 4 Oct 2022 13:21:58 -0700 Subject: Added comments to cpp file --- CST116-Ch5-Lopez-Bonilla/CST116-Ch5-Lopez-Bonilla.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) 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 #include + 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; -- cgit v1.2.3