Hi
I have to write a prg for the following question..
A file carsale_june.tx t stores the number of small and medium-sized of cars sold in the month of June by a car company. The first line of carsale_june.tx t is an integer that indicates the number of carsalemen working in the company. Each row afterwards consists of three data items, namely, the saleman employee id, followed by the number of small-sized and medium-sized cars he sold. A typical carsale_june.tx t file is as follows:
4
01107 10 6
08821 5 8
96512 14 6
23115 20 3
Write a program that uses the carsale_june.tx t file to print the average number of cars sold in June and the id of the carsaleman who makes a sale higher than the average.
i can create the file then how wat do i do? i think i have to use seekp and seekg koz the 2nd and 3rd column is for number of cars sold
how do i use seekp or seekg? can sumbody explain plzzz
I have to write a prg for the following question..
A file carsale_june.tx t stores the number of small and medium-sized of cars sold in the month of June by a car company. The first line of carsale_june.tx t is an integer that indicates the number of carsalemen working in the company. Each row afterwards consists of three data items, namely, the saleman employee id, followed by the number of small-sized and medium-sized cars he sold. A typical carsale_june.tx t file is as follows:
4
01107 10 6
08821 5 8
96512 14 6
23115 20 3
Write a program that uses the carsale_june.tx t file to print the average number of cars sold in June and the id of the carsaleman who makes a sale higher than the average.
i can create the file then how wat do i do? i think i have to use seekp and seekg koz the 2nd and 3rd column is for number of cars sold
how do i use seekp or seekg? can sumbody explain plzzz
Comment