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
Create a
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
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images