Question: how do i solve this without using arrays? Assignment: The client will provide data in the form of a text file. There are three numbers

how do i solve this without using arrays?
how do i solve this without using arrays? Assignment: The client will

Assignment: The client will provide data in the form of a text file. There are three numbers on each line, separated by spaces. The numbers represent the number of calories consumed for breakfast, lunch and dinner, respectively. You should assume that the file includes data for exactly one week (i.e., seven lines of text representing seven days Monday to Sunday). Your program should read the data from the file, where each row keeps record of calories consumed for breakfast, lunch, and dinner. Your program should compute and print out the following information: The average number of calories consumed each day The average number of calories consumed in each of the three meals . Your program must not contain any array. Your program must read the data from a file named input.txt. You may assume that the file has exactly three numbers in each column and seven rows. Example content of an input file: 200.0 1000 800 450 845 1200 800 250 400.6 0 1500 1800 600 500 1000 700 1400 1700 675 400 900

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!