Question: help please. purchase and the amount tendered. cout Enter amount of purchase and amount tendered: ; cin cost tendered; 7. The variables you will need

help please.
help please. purchase and the amount tendered. cout "Enter amount of purchase

purchase and the amount tendered. cout "Enter amount of purchase and amount tendered: "; cin cost tendered; 7. The variables you will need are: double tendered; double cost; int change; int fifties, twenties, tens, fives, dollars, quarters, dimes, nickels, pennies; 8. After calculating the change, convert it to an integer by multiplying it by 100 and storing it in an int. change = (tendered cost )100+.5; 9. Then output the amount of change and a breakdown of how many fifties, twenties, tens, ones, quarters, dimes, nickels and pennies will be returned in change. 10. Then use division and modulo division to extract the numbers of bills and coins. fifties = change /5000; change = change of 5000 ; A typical run would be: Enter amount of purchase and amount tendered: 2.09100.00 For your purchase of \$2.09 you tendered $100 Your change is 97.91 Fifties: 1 Twenties: 2 Tens: 0 Fives: 1 Ones: 2 Quarters: 3 Dimes: 1 Nickels: 1 Pennies: 1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!