Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribedimage text in transcribedplease, 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.83

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intranet And Web Databases For Dummies

Authors: Paul Litwin

1st Edition

0764502212, 9780764502217

More Books

Students also viewed these Databases questions

Question

What is the most important part of any HCM Project Map and why?

Answered: 1 week ago