February 25, 2012

Problem Statement: Exchange of currency rates

Problem Statement: Exchange of currency rates (Download)

You are required to write a program for Currency Exchange rates. The basic idea is that user/reader will be able to interchange different currencies using our program. User will have three options i.e. Pakistani Rupees, US Dollars, and Euro.

 

Detailed Description:

  1. The program should display

 

Please select currencies that you want to exchange.

Description:

Enter ‘R’ for Pakistani Rupees.

Enter ‘E’ for Euro.

Enter ‘D’ for Dollar.

Then your program should take these inputs,

  1. Depending upon the choices that user has entered, your program will further display the prompt
  1. Then the program should take two inputs from the user as:

—————————————————————–

Please select the currency that you want to convert :

Please select the currency that you want to convert into:

—————————————————————–

  1. After getting both inputs, program will calculate the currency rates on the basis on this information.

 

1 Euro = 112 Rupees.

1 Dollar = 84 Rupees.

1 Euro = 1.33 Dollars

1 Dollar = 0.75 EUR

After calculating the conversion rate for the selected currencies display it on the screen.

In the end of the program, user should be asked if he/she wants to make another conversion.

If user presses y then the whole program should start again. If user presses n then the program should terminate.

 

Sample Output

 

Dev c++ Output:
Please select currencies that you want to exchange.

Description:

Enter ‘R’ for Pakistani Rupees.

Enter ‘E’ for Euro.

Enter ‘D’ for Dollar.

Please select the currency that you want to convert : E

Please select the currency that you want to convert into: D

Please enter the amount in Euro : 12

12 Euro = 16 Dollars

Do you want to make another conversion? (y/n) : y

Please select currencies that you want to exchange.

Description:

Enter ‘R’ for Pakistani Rupees.

Enter ‘E’ for Euro.

Enter ‘D’ for Dollar.

Please select the currency that you want to convert : R

Please select the currency that you want to convert into: D

Please enter the amount in Rupees : 90

90 Rupees = 1.07143 Dollars

Do you want to make another conversion? (y/n) : n

Last updated: March 19, 2014