Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft Outlook 2023

Authors: James Holler

1st Edition

B0BP9P1VWJ, 979-8367217322

More Books

Students also viewed these Databases questions