Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help me solve this question using c programming. Question 3 [Soalan 3] The tab delimited file vehicle.txt contains the sales information of different types

image text in transcribed

Please help me solve this question using c programming.

Question 3 [Soalan 3] The tab delimited file "vehicle.txt" contains the sales information of different types of vehicles (car, MPV, bus and lorry) as follows: (Fail "vehicle.txt" mengandungi maklumat jualan jenis kenderaan yang berbeza (kereta, MPV, bas dan lori). Maklumat di dalam fail tersebut dipisahkan oleh tab adalah seperti berikut:] Month January February March April May June Car 100 150 125 75 80 95 MPV 75 25 66 35 30 33 Bus 50 45 22 30 15 35 Lorry 25 20 12 25 13 22 (a) Draw the flowchart to read the file, calculate the sum of sales and average of sales for each type of vehicle, and then store it into a file named "sales.txt. [Lukiskan carta alir untuk membaca fail, mengira jumlah jualan dan purata jualan bagi setiap jenis kenderaan, dan kemudian menyimpannya ke dalam fail bernama "sales.txt".) (6 Marks / Markah) (b) Write a C program to read the file, calculate the sum of sales and average of sales for each type of vehicle, and then store it into a file named sales.txt. [Tulis satu aturcara C untuk membaca fail, mengira jumlah jualan dan purata jualan bagi setiap jenis kenderaan, dan kemudian menyimpannya ke dalam fail bernama "sales.txt".) (14 Marks / Markah)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Time Series Databases New Ways To Store And Access Data

Authors: Ted Dunning, Ellen Friedman

1st Edition

1491914726, 978-1491914724

More Books

Students also viewed these Databases questions

Question

What are Fatty acids?

Answered: 1 week ago

Question

What are Electrophoresis?

Answered: 1 week ago