Implement a C program to read in a list of sales records from

Added on - 16 Sep 2019

  • 1

    pages

  • 214

    words

  • 125

    views

  • 0

    downloads

Showing pages 1 to 1 of 1 pages
Implement a C program to read in a list of sales records from the file 'purchases.txt'.The 'purchases.txt' stores one sales record per line, and the lines look like this:There are total of 6 data fields, and they represent: date, time, store location, item category,sales value and payment method respectively, and they are separated by tabs.Based on the sales records, your program is required to generate a sales executive report withthe following information:- The figures of the total sales grouped by the payment methods.- The top THREE store locations with the highest aggregate sales.- The THREE store locations with the lowest aggregate sales.- The peak hour at which incurs the highest aggregate sales.- The off peak hour at which incurs the lowest aggregate sales.Hour slots are defined in the 30 minute intervals.(e.g. Sales records with the time 10:00, 10:15 are considered to be in 10:00 slot; salesrecords with the time 10:31, 10:59 are considered to be in 10:30 slot)Below is a sample output of the program running against a much smaller data set: