required to write a program for Currency Exchange rates. Thebasic idea is that u
ID: 3618318 • Letter: R
Question
required to write a program for Currency Exchange rates. Thebasic idea is that user/reader will be able to interchangedifferent currencies using our program. User will have threeoptions i.e. Pakistani Rupees, US Dollars, and Euro.
DetailedDescription:
1. Theprogram should display
Please select currencies that youwant to exchange.
Description:
Enter ‘R’ forPakistani Rupees.
Enter ‘E’ for Euro.
Enter ‘D’for Dollar.
Then your program should take theseinputs,
2. Dependingupon the choices that user has entered, your program will furtherdisplay the prompt
3. Then theprogram should take two inputs from the user as:
-----------------------------------------------------------------
Pleaseselect the currency that you want to convert:
Pleaseselect the currency that you want to convert into:
-----------------------------------------------------------------
4. Aftergetting both inputs, program will calculate the currency rates onthe 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 selectedcurrencies display it on the screen.
In the end of the program, user should be asked if he/she wantsto make another conversion.
If user presses y then the whole programshould start again. If user presses n then the program shouldterminate.
Explanation / Answer
//Currency Exchange Program #include using namespace std; /* 1 Euro = 112 Rupees. 1 Dollar = 84 Rupees. 1 Euro = 1.33 Dollars 1 Dollar = 0.75 EUR*/ int main() { char myCur, convCur; double myRupees(0), myEuros(0),myDollars(0); double convertedAmount(0); bool flag = false; while(flag == false) { coutRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.