Please code this in c++
5.19 Farmer's market - files
Get the file name from...
![Computers and Technology](/tpl/images/cats/informatica.png)
Computers and Technology, 07.05.2020 00:02, elsauceomotho
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
![answer](/tpl/images/cats/otvet.png)
Answers: 1
Other questions on the subject: Computers and Technology
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 01:00, tyneshiajones124
Duplicating objects creates copies that a. move differently than the original object b. erase the original object c. look and act like the original object d. add events to a game
Answers: 1
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 10:30, badpotterchris
How would you categorize the software that runs on mobile devices? break down these apps into at least three basic categories and give an example of each.
Answers: 1
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 13:30, alannaamarriee
Jace needs to answer a question on square roots to win a quiz. how can he use a spreadsheet to find the square root of 786? a. use the functions round and count b. create a table and chart c. use the function sqrt d. use the function now
Answers: 3
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 24.06.2019 05:30, MOONCHILDSUGA
If you combine two cells into one, what action are you performing? a. adding a new row or column b. splitting the cells c. removing a new row or column d. merging the cells
Answers: 2
Do you know the correct answer?
Questions in other subjects:
![Konu](/tpl/images/cats/fizika.png)
![Konu](/tpl/images/cats/istoriya.png)
![Konu](/tpl/images/cats/biologiya.png)
Biology, 18.08.2019 22:30
![Konu](/tpl/images/cats/biologiya.png)
Biology, 18.08.2019 22:30
![Konu](/tpl/images/cats/istoriya.png)
![Konu](/tpl/images/cats/en.png)
![Konu](/tpl/images/cats/mat.png)
![Konu](/tpl/images/cats/en.png)
English, 18.08.2019 22:30
![Konu](/tpl/images/cats/obshestvoznanie.png)
Social Studies, 18.08.2019 22:30
![Konu](/tpl/images/cats/health.png)
Health, 18.08.2019 22:30