subject

Please code this in c++

5.19 Farmer's market - files

Get the file name from the user and open it using code. The file has the product name and price/lb in each line.

Until the EOF is reached:

Read the product name from the file

prompt the user for entering the weight of that product. (Points will be taken off if you hard-code the product name inside your code).

Once the user enters the weight(0 if user does not buy that item), calculate the cost of that item by reading the price of that item from the file and multiplying by the weight entered by the user.

Maintain a running total of the cost until all the items have been entered by user.

Once EOF is reached, display the total cost of the purchase

product. txt // contains the following

apple 1.59
orange 0.99
banana 0.69
grapes 2.99

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 19:30
What are loans to a company or government for a set amount of time
Answers: 1
question
Computers and Technology, 24.06.2019 02:30
Which option completes the explanation for conflict of interest in an organization
Answers: 1
question
Computers and Technology, 24.06.2019 03:30
Explain the importance of html in web page designing in 20 sentences..
Answers: 1
question
Computers and Technology, 24.06.2019 07:20
Ingrid started speaking about her slide presentation. when she clicked to th"third slide, which had just a picture of an elephant, she forgot what she wassupposed to talk about. what could ingrid do to avoid this situation in thefuture? oa. print handouts for her audience.ob. add presenter's notes to each slide.oc. add a video to each slide.od. save her slide presentation to a flash drive
Answers: 2
You know the right answer?
Please code this in c++

5.19 Farmer's market - files

Get the file name from...
Questions
question
Mathematics, 10.09.2021 01:00
question
Mathematics, 10.09.2021 01:00
question
Mathematics, 10.09.2021 01:00
question
Mathematics, 10.09.2021 01:00
question
Mathematics, 10.09.2021 01:00
question
Mathematics, 10.09.2021 01:00
question
Mathematics, 10.09.2021 01:00
Questions on the website: 13722360