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:

  1. Display a greeting with your name and ID(1 pt )
  2. 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:

  1. 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

  1. 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

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 Programming Questions!