Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Construct a C++ program using function to calculate how much Malaysian Ringgit (RM) would be required to buy either US Dollar, European Euro or Japanese

Construct a C++ program using function to calculate how much Malaysian Ringgit (RM) would be required to buy either US Dollar, European Euro or Japanese Yen. The function has the following prototype:

double BuyCurrency (char, double);

The first parameter is for the type of currency where the character D, E and Y would be used to represent Dollar, Euro and Yen respectively. The second parameter would be the amount of money to be bought. The function would return the amount of Malaysian ringgit (RM). The exchange rate is given as follows:

(Dollar) $1 = RM3.80; (Euro) 1 = RM4.70; (Yen) 100 = RM3.60;

Construct a C++ program that will prompt the user to enter the currency preferred and the amount. The program would display the amount in Malaysian Ringgit that would have to be paid to buy the currency.

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_2

Step: 3

blur-text-image_3

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

Database Driven Web Sites

Authors: Joline Morrison, Mike Morrison

2nd Edition

? 061906448X, 978-0619064488

More Books

Students also viewed these Databases questions