Create a program that asks the user for a non-negative amount of money (in Pesos). Once the user has given the amount, the program should print a menu of actions to be done on the input. The possible actions are the following: 1) Convert to US Dollars (51.07 Pesos = 1 Dollar) 2) Convert to Japanese Yen (1 Peso = 2.24 Yen) 3) Convert to Euro (1 Peso = 0.017 Euro) 4) Compute for Savings - The user will be asked how many % of the initial input will be saved and to what currency will the savings be converted (Must use functions created for 1-3 to convert).   Your program should have at least six functions 1) A function for the menu 2) A function for asking the initial input 3) Convert to US Dollars 4) Convert to Japanese Yen 5) Convert to Euro 6) Compute for Savings (Can ask for additional input. Will have to use functions 3-5 for conversion)   DO NOT USE GLOBAL VARIABLES for your functions. Make sure to pass your inputs as parameters. Then return the result.   ------------------------------------------------------------------------------------------------------------------ Sample run: Enter amount: 100 Convert to Dollars Convert to Yen Convert to Euro Compute for Savings Exit Enter your choice:1   100 pesos in US Dollars is 1.96 Convert to Dollars Convert to Yen Convert to Euro Compute for Savings Exit Enter your choice:2 100 pesos in Japanese Yen is 224.31 Convert to Dollars Convert to Yen Convert to Euro Compute for Savings Exit Enter your choice:3 100 pesos in Euro is 1.74 Convert to Dollars Convert to Yen Convert to Euro Compute for Savings Exit Enter your choice:4 How much in % would you like to save? 30 In what currency would you like to convert to? ([1] Dollars [2] Yen [3] Euro) 1 Your savings is 0.62 Convert to Dollars Convert to Yen Convert to Euro Compute for Savings Exit Enter your choice:0

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter4: Control Structures I (selection)
Section: Chapter Questions
Problem 20PE: The cost of renting a room at a hotel is, say $100.00 per night. For special occasions, such as a...
icon
Related questions
Question
100%

Create a program that asks the user for a non-negative amount of money (in Pesos). Once the user has given the amount, the program should print a menu of actions to be done on the input.

The possible actions are the following:

1) Convert to US Dollars (51.07 Pesos = 1 Dollar)

2) Convert to Japanese Yen (1 Peso = 2.24 Yen)

3) Convert to Euro (1 Peso = 0.017 Euro)

4) Compute for Savings - The user will be asked how many % of the initial input will be saved and to what currency will the savings be converted (Must use functions created for 1-3 to convert).

 

Your program should have at least six functions

1) A function for the menu

2) A function for asking the initial input

3) Convert to US Dollars

4) Convert to Japanese Yen

5) Convert to Euro

6) Compute for Savings (Can ask for additional input. Will have to use functions 3-5 for conversion)

 

DO NOT USE GLOBAL VARIABLES for your functions. Make sure to pass your inputs as parameters. Then return the result.

 

------------------------------------------------------------------------------------------------------------------

Sample run:

Enter amount: 100

  1. Convert to Dollars
  2. Convert to Yen
  3. Convert to Euro
  4. Compute for Savings
  5. Exit

Enter your choice:1

 

100 pesos in US Dollars is 1.96

  1. Convert to Dollars
  2. Convert to Yen
  3. Convert to Euro
  4. Compute for Savings
  5. Exit

Enter your choice:2

100 pesos in Japanese Yen is 224.31

  1. Convert to Dollars
  2. Convert to Yen
  3. Convert to Euro
  4. Compute for Savings
  5. Exit

Enter your choice:3

100 pesos in Euro is 1.74

  1. Convert to Dollars
  2. Convert to Yen
  3. Convert to Euro
  4. Compute for Savings
  5. Exit

Enter your choice:4

How much in % would you like to save? 30

In what currency would you like to convert to? ([1] Dollars [2] Yen [3] Euro) 1

Your savings is 0.62

  1. Convert to Dollars
  2. Convert to Yen
  3. Convert to Euro
  4. Compute for Savings
  5. Exit

Enter your choice:0

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Constants and Variables
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT