Question: 1. Write a program that asks the user for two integers (lets call input 1 my_num and input 2 x). The program will divide my_num

1. Write a program that asks the user for two integers (lets call input 1 my_num and input 2 x). The program will divide my_num by x three times and outputs the quotient after each division. For example:

If the input is 2000 2

Then the output should be 1000 500 250

2. Write a program that asks the user for the number of quarters, dimes, nickels, and pennies (in that order) they have. Then calculate and output the amount of U.S. dollars the coins are worth. Use setprecision and setw to format your output to two decimal places. For example:

If the input is 4 3 2 1, which is 4 quarters, 3 dimes, 2 nickels, and 1 penny,

Then the output should be You have $1.41

3. Write a program that inputs a string from the user and outputs that same string backwards. For example:

If the input is Peter Piper Picked a Pickled Pepper.

The output should be .reppeP delkciP a dekciP repiP reteP

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!