The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Jul 2017 |
| Last Sign in: | 304 Weeks Ago, 3 Days Ago |
| Questions Answered: | 15833 |
| Tutorials Posted: | 15827 |
MBA,PHD, Juris Doctor
Strayer,Devery,Harvard University
Mar-1995 - Mar-2002
Manager Planning
WalMart
Mar-2001 - Feb-2009
Write a C++ program called "assignmentlcpp" that will calculate the tip to leave at a restaurant. Your
program must ask the user for the amount of the bill (this could contain decimals), and the percent they
want to tip. The user will enter the percent they want to tip as an integer, e.g. 15 for 15. Your code should include- - Comments explaining the main parts of the code (Getting input, calculating results, etc)
. Descriptive variable names with appropriate types
- Appropriate indentation between braces For this and all subsequent assignments, provide a heading {in comments) with the course information,
your name, and assignment number. Sample Output Below is sample output with input in bold. Your output does not need to match directly.
Sample 1 Enter the bill amount: $100.00 What percent would you like to tip: 15
Tip Amount: $15.00 Total amount with tip: $115.00 Sample 2 Enter the bill amount: $15.50
What percent would you like to tip: 10 Tip Amount: $1.55
Total amount with tip: $17.05
----------- Â ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly