Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Modern Dental Assisting

Authors: Doni Bird, Debbie Robinson

13th Edition

978-0323624855, 0323624855

Students also viewed these Programming questions

Question

\f\f

Answered: 1 week ago