Question: Hey guys, do you think you could help out with this assignment? I'd greatly appreciate it as I'm having trouble getting it all to work.

Hey guys, do you think you could help out with this assignment? I'd greatly appreciate it as I'm having trouble getting it all to work. All coded in C++

Bianca is preparing special dishes for her daughters birthday. It takes her a minutes to prepare the first dish, and each following dish takes b minutes longer than the previous dish. She has t minutes to prepare the dishes. For example, if the first dish takes a = 10 minutes and b = 5, then the second dish will take 15 minutes, the third dish will take 20 minutes, and so on. If she has 80 minutes to prepare the dishes, then she can prepare four dishes because 10 + 15 + 20 + 25 = 70. A data file has been provided with the following data, where a, b, and t are described above. a b t This data file times.txt is attached as part of this assignment. You should download this file to a convenient place on your hard drive. Your assignment is to prompt the user to enter the full pathname to a data file on disk. If the file does not exist in the specified location, your program should exit with a suitable error message. The first thing your program should do is output to the screen a copy of the data read in from the disk file. This is known as echoing the input data. Your program should then calculate the number of dishes she can prepare for each a, b, and t on a given line and output it in a text file called output.txt. So, output.txt should look like this with data: a b t number of dishes All data in files are separated by space and should be easily readable. Your program must work if I change the number of lines in my text file. You must use an appropriate loop and an exit condition for this.

The textfile contains these numbers:

10 5 70 5 15 85 12 9 75 10 6 60 20 10 100 15 8 95 4 3 35 20 10 200 9 5 65

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!