Create a C++ program starting with a cout statement to ask the user to “Enter your full name: ” and then store the result in a fullName string variable. You must use getline with your cin statement

Create a C++ program starting with a cout statement to ask the user to “Enter your full name: ” and then store the result in a fullName string variable. You must use getline with your cin statement so that the program can handle having two or more words display as fullName and send the user to a new line and then to another new line. (See screen shots below)

Next, ask the user “How many quarters do you have? “ and save the user’s response to an int variable named numberOfQuarters using a cin statement and send the user to a new line. (See screen shots below)

Next, ask the user “How many dimes do you have? “ and save that number to an int variable named numberOfDimes using another cin statement and send the user to another new line. (See screen shots below)

Next, ask the user “How many nickels do you have? “ and save that number to an int variable named numberOfNickels using a cin statement and send the user to another new line. Then send the user to another new line as seen in the screen shots below.

You then need to calculate the total number of pennies. You get this calculation from the quarters, dimes, and nickels variables. You multiply the number of quarters entered times 25 and the number of dimes entered times 10 and the number of nickels entered times 5 to get the total number of pennies and then add those numbers up and assign the result to the double variable named totalNumberOfPennies.

Then, do another calculation to divide the totalNumberOfPennies by 100 and assign the result to a double variable named dollarsAndCents

Next, display the results as seen in the test cases below:

Next, use a cout statement to say “Hi “ and add the fullName variable to the cout statement and then add a comma and enter the code to go to a new line. (See screen shots below)

Use another cout statement to type “The change in pennies = “ and then use the variable you created for the total number of pennies (totalNumberOfPennies) and go to a new line. This result should be displayed as a whole number (no decimal places). (See screen shots below)

Finally, display the pennies in dollar output format with two decimal places in another cout statement stating, “The dollars and cents = $” and then put the dollarsAndCents variable next to it. (See screen shots below)

You also need to include a cout statement with fixed showpoint and setprecision as appropriate to show exactly two decimal places for the dollarsAndCents double variable. Also, put a $ sign in the appropriate place in the cout statement so that the $ sign shows up right next to the dollarsAndCents variable. (See screen shots below)

TEST DECK 1: Enter your full name. Then put 10 for quarters and enter, then put 15 for dimes and enter, then put 20 for nickels and enter again. The result should be 500 pennies and $5.00 for dollars and cents. (See screen shot below for the exact output your code should display)

see test deck 1 in attached

TEST DECK 2: Enter your full name. Then put 1 for quarters and enter, then put 2 for dimes and enter, then put 3 for nickels and enter again. The result should be 60 pennies and $0.60 for dollars and cents. (See screen shot below for the exact output your code should display)

see test deck 2 in attached

Hide 

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more
error: Content is protected !!