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, 22.06.2019 22:30
One of your customers wants you to build a personal server that he can use in his home. one of his concerns is making sure he has at least one backup of their data stored on the server in the event that a disk fails. you have decided to back up his data using raid. since this server is for personal use only, the customer wants to keep costs down. therefore, he would like to keep the number of drives to a minimum. which of the following raid systems would best meet the customer's specifications? a. raid 0 b. raid 1 c. raid 5 d. raid 10
Answers: 3
question
Computers and Technology, 23.06.2019 03:30
Many everyday occurrences can be represented as a binary bit. for example, a door is open or closed, the stove is on or off, and the fog is asleep or awake. could relationships be represented as a binary value? give example.
Answers: 1
question
Computers and Technology, 23.06.2019 17:30
Per the municipal solid waste report, what are the most common sources of waste (trash
Answers: 3
question
Computers and Technology, 23.06.2019 21:40
language consists of basic components, and they are called a. 3; mental images, concepts, and speech b. 2; language acquisition and linguistic relativity c. 3; heuristics, algorithms, and analogies d. 4; phonemes, morphemes, syntax, and semantics e. 2; words and grammar
Answers: 3
You know the right answer?
Please code this in c++

5.19 Farmer's market - files

Get the file name from...
Questions
Questions on the website: 13722363