1) create food.txt with the following contents turkey 20.80 pie 7.4 stuffing 2.68 2) read the values from file.txt in a function using references parameters [Note: You must write a function and you must use reference parameters] 3) Print the cost for each item and total cost [Note: Your costs should be in the following format dollar sign dollars sents and show 2 decimal points]

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter13: Overloading And Templates
Section: Chapter Questions
Problem 22SA
icon
Related questions
Topic Video
Question

C++ must attach ouput and code screen shot and editable code  

also do add comments

answer correctly else downvote

1) create food.txt with the following contents
turkey 20.80
pie 7.4
stuffing 2.68
2) read the values from file.txt in a function using references
parameters [Note: You must write a function and you must use
reference parameters]
3) Print the cost for each item and total cost
[Note: Your costs should be in the following format dollar sign
dollars.cents and show 2 decimal points]
Transcribed Image Text:1) create food.txt with the following contents turkey 20.80 pie 7.4 stuffing 2.68 2) read the values from file.txt in a function using references parameters [Note: You must write a function and you must use reference parameters] 3) Print the cost for each item and total cost [Note: Your costs should be in the following format dollar sign dollars.cents and show 2 decimal points]
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 4 images

Blurred answer
Knowledge Booster
Instruction Format
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning