Question
Write a C++ program thatdisplay a menu to the user and askes user to choose to convert from USDor Euroand display in SAR: Display a
Write a C++ program thatdisplay a menu to the user and askes user to choose to convert from USDor Euroand display in SAR:
- Display a greeting with your name and ID(1 pt )
- The program displays a menu to make the user choose(using loop structure) : (2 pts )
Ask the user to enter the value he wants to convert ( 1 pt )
The menu 3 content:
- ConvertUSD(2 pts )
A function that return a number, and take the value the user wants to convert as a parameter.
It works as following:
SarValue=the value to convert* 3.75
- ConvertEuro(2 pts )
A function that return a number, and take the value the user wants to convert as a parameter.
It works as following:
SarValue= the value to convert* 4.22
Exit(if he choose 3or any number not 1 or 2 )(1 pt )
--------------
output :
Hi Shatha 440000000
Choose:
1)Convert from USD
2)Convert from Euro
3)exit
1
Enter the value you want to convert: 2
The value in SAR= 7.5
Choose:
1)Convert from USD
2)Convert from Euro
3)exit
2
Enter the value you want to convert: 3
The value in SAR= 12.66
Choose:
1)Convert from USD
2)Convert from Euro
3)exit
3
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started