Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please, help me to solve this questions~! This is a C++ question. thkank you!! The Backstory After walking for 2 days, 7 hours, 27 minutes
please, help me to solve this questions~!
This is a C++ question.
thkank you!!
The Backstory After walking for 2 days, 7 hours, 27 minutes and about 36 seconds, Don Ramon and el chavofinally made ittoAcapulco. Needless to say thatthey are excited and want to explore the city and buy food andsouvenirs. Unfortunately, things are not quite as straightforward as in Mexico city. For starters, prices are listed in foreign currencies, and for some reason stores do not listthe unit price of a product. El chavo wants to buy his favorite food "torta de jamon' (ham sandwich), and while one store has the item listed as4 tortas 20 dollars, another one lists the same item as 5tortas 15 euros. Since they are already short on cash they do not want to spend more money than what they should. They could try figuring out the conversions and unit prices but as you know, they are not very good with math. Y ahora, quin podra ayudarlos? (who can help them now?). Your Assignment One more time, you are to play the role of el chapulin colorado. Write a program that solves this problem. The idea is to read some information from the console and calculatethe exchange rate between currencies as well as the unit price of the inputted item. One of the currencies is input by the user,and the other is pesos. Two sample runs of the program are shown below. User input is given in red for clarity. Notice that the first column adjusts to the length of the words. Sample run 1: Enter the desired purchase 4 tortas Enter the price 12.24 swiss-francs Enter the exchange rate (in pesos) 1 swiss-franc 5.5 Currency exchange Swiss franc-to-peso rate 5.50 peso-to-swiss-franc rate 0.18 Unit prices in swiss francs 3.06 in pesos 16.83 The Backstory After walking for 2 days, 7 hours, 27 minutes and about 36 seconds, Don Ramon and el chavofinally made ittoAcapulco. Needless to say thatthey are excited and want to explore the city and buy food andsouvenirs. Unfortunately, things are not quite as straightforward as in Mexico city. For starters, prices are listed in foreign currencies, and for some reason stores do not listthe unit price of a product. El chavo wants to buy his favorite food "torta de jamon' (ham sandwich), and while one store has the item listed as4 tortas 20 dollars, another one lists the same item as 5tortas 15 euros. Since they are already short on cash they do not want to spend more money than what they should. They could try figuring out the conversions and unit prices but as you know, they are not very good with math. Y ahora, quin podra ayudarlos? (who can help them now?). Your Assignment One more time, you are to play the role of el chapulin colorado. Write a program that solves this problem. The idea is to read some information from the console and calculatethe exchange rate between currencies as well as the unit price of the inputted item. One of the currencies is input by the user,and the other is pesos. Two sample runs of the program are shown below. User input is given in red for clarity. Notice that the first column adjusts to the length of the words. Sample run 1: Enter the desired purchase 4 tortas Enter the price 12.24 swiss-francs Enter the exchange rate (in pesos) 1 swiss-franc 5.5 Currency exchange Swiss franc-to-peso rate 5.50 peso-to-swiss-franc rate 0.18 Unit prices in swiss francs 3.06 in pesos 16.83Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started