Question: urgent please answer ASAP Problem 1 - 25 points a. Write a function dollars ToLBPOthat takes as parameters an amount in dollars (of type double)

Problem 1 - 25 points a. Write a function dollars ToLBPOthat takes as parameters an amount in dollars (of type double) and an exchange rate (of type integer), and returns the equivalent of the amount in LBP. If the exchange rate is equal to 1, the program considers 18 = 1515 LBP. If the exchange rate is equal to 2, the program considers 15 - 3900 LBP. If the exchange rate is equal to 3, the program considers 15 = 8900 LBP. b. Write a C++ program that: Asks the user to enter an amount in dollars (of type double) Asks the user to enter an exchange rate of type integer) Use the function of Part a to calculate the equivalent in LBP. Prints on the screen the result of the function. Sample Runs Please enter the amount in dollars: 20 Exchange rate (1: Official. 2: Bank, 3: Black Market)? 1 20 $ is equal to 3380 LAP Please enter the anount in dollars: 20 ze s is equal to 78000 LOP Exchange rate (1: Official, 2: Bank, 3: Black Market)? 2 Please enter the amount in dollars: 20 Exchange rate (1: Official, 2: Bank, 3: Black Market)? 3 20 $ 15 equal to 177000 LBP double dollarsToLBP(double, int): int main() { double dollars, LBP; int exchange Rate; double dollarsTOLBP(double, int); int main() double dollars, LBP; int exchange Rate; return 0; } double dollarsTOLBP { ) }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
