posted 8 years ago
Hello, I am trying to modify the source code to read the sales amounts from a text file instead of the keyboard The code itself works and does that but it reads the text file and then asks me to input data. I am kind of a novice/intermediate so any advice would be greatly appreciated.
The purpose of this program:
Write a program that stores the weekly (Monday thru Friday) sales totals for three salespersons. Your program should read the sales amounts from a text file and print a sales report with headings, the daily totals for each salesperson (your two-dimensional array), the calculated weekly totals for each sales person and the calculated totals for the day of each salesperson. In addition, create a single-dimensional array of Strings representing the days of the week (Monday-Friday) using an initializer list.
Output Screen
Weekly Sales Report
Mon Tue Wed Thurs Fri Total
1 10.00 20.00 30.00 40.00 50.00 150.00
2 60.00 70.00 80.00 90.00 10.00 310.00
3 20.00 30.00 40.00 50.00 60.00 200.00
--------------------------------------------------------------
90.00 120.00 150.00 180.00 120.00 660.00