|* create a program named currency converter.cpp use the following pseudocode to write the program: this program will take US dollars and convert to either Canadian dollars, or Mexican pesos. welcome the user to Currency Converter! ask them to input the number of dollars they wish to convert validate their amount (no amounts less than or equal to zero) & display a message saying invalid entry, dollars must be greater than zero. ask them which country they wish to convert their money use these exchange rates: 1 US Dollar is equal to 1.31 Canadian dollars; 1 US Dollars is equal to 20.39 pesos. validate their country choice-if 1 and 2 are used for countries, and they input another number, display an invalid entry message and loop until they enter a valid entry. you will declare two functions to convert dollars: call one convertCanada and the other convertMexico. if the user selects Canada, call the convertCanada function; if they select Mexico, call the convertMexico function. when you call either of these functions, pass the dollars amount's value to the function. place the functions' definitions below the main function. convertCanada and convertMexico will multiply the dollars value times the (from above) and display it in a sentence. fomat the currency to two decimal places, showing the decimal points alwa For example: If user inputs ten for dollars and chooses Canada, it should o "That is equal to 13.10 Canadian dollars." declare function prototypes for convertCanada and convertMexico above th test your program for every possibility: 1) the user enters invalid entry for dollars 2) the user enters invalid entry for country 3) user chooses Canada 4) the user chooses Mexico if all works, submit your file"/

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter2: Using Data
Section: Chapter Questions
Problem 1CP: In Chapter 1, you created two programs to display the motto for the Greenville Idol competition that...
icon
Related questions
Question

answer this in c++

/* create a program named currency converter.cpp
use the following pseudocode to write the program:
this program will take US dollars and convert to either Canadian
dollars, or Mexican pesos.
welcome the user to Currency Converter!
ask them to input the number of dollars they wish to convert
validate their amount (no amounts less than or equal to zero) & display
a message saying invalid entry, dollars must be greater than zero.
ask them which country they wish to convert their money
use these exchange rates: 1 US Dollar is equal to 1.31 Canadian dollars;
1 US Dollars is equal to 20.39 pesos.
validate their country choice-if 1 and 2 are used for countries, and
they input another number, display an invalid entry message and
loop until they enter a valid entry.
you will declare two functions to convert dollars:
call one convertCanada and the other convertMexico.
if the user selects Canada, call the convertCanada function; if they
select Mexico, call the convertMexico function.
when you call either of these functions, pass the dollars amount's value
to the function.
place the functions' definitions below the main function.
convertCanada and convertMexico will multiply the dollars value times the exchange rate
(from above) and display it in a sentence.
format the currency to two decimal places, showing the decimal points always.
For example: If user inputs ten for dollars and chooses Canada, it should output:
"That is equal to 13.10 Canadian dollars."
declare function prototypes for convertCanada and convertMexico above the main function.
test your program for every possibility:
1) the user enters invalid entry for dollars
2) the user enters invalid entry for country
3) user chooses Canada
4) the user chooses Mexico
if all works, submit your file*/
Transcribed Image Text:/* create a program named currency converter.cpp use the following pseudocode to write the program: this program will take US dollars and convert to either Canadian dollars, or Mexican pesos. welcome the user to Currency Converter! ask them to input the number of dollars they wish to convert validate their amount (no amounts less than or equal to zero) & display a message saying invalid entry, dollars must be greater than zero. ask them which country they wish to convert their money use these exchange rates: 1 US Dollar is equal to 1.31 Canadian dollars; 1 US Dollars is equal to 20.39 pesos. validate their country choice-if 1 and 2 are used for countries, and they input another number, display an invalid entry message and loop until they enter a valid entry. you will declare two functions to convert dollars: call one convertCanada and the other convertMexico. if the user selects Canada, call the convertCanada function; if they select Mexico, call the convertMexico function. when you call either of these functions, pass the dollars amount's value to the function. place the functions' definitions below the main function. convertCanada and convertMexico will multiply the dollars value times the exchange rate (from above) and display it in a sentence. format the currency to two decimal places, showing the decimal points always. For example: If user inputs ten for dollars and chooses Canada, it should output: "That is equal to 13.10 Canadian dollars." declare function prototypes for convertCanada and convertMexico above the main function. test your program for every possibility: 1) the user enters invalid entry for dollars 2) the user enters invalid entry for country 3) user chooses Canada 4) the user chooses Mexico if all works, submit your file*/
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Algebraic Expressions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT