Question: URGENTLY NEEDED a Exercise 3: A structure type called SalesRecord is designed to hold all necessary data regarding salesman in a company and the sales

URGENTLY NEEDED

URGENTLY NEEDED a Exercise 3: A structure type called SalesRecord is designedto hold all necessary data regarding salesman in a company and the

sales information that he or she has made. The SalesRecord structure and

a Exercise 3: A structure type called SalesRecord is designed to hold all necessary data regarding salesman in a company and the sales information that he or she has made. The SalesRecord structure and an array variable called salesRep are declared below: struct SalesRecord { int id; char name [30]; double quarterlySales [4]; double totalAnnual; }; SalesRecord salesRep [20]; a) A function named readRecord is designed to read the information of all the salesmen of the company from the user. Assume that the company has 20 salesmen. Below is the prototype of the function. void readRecord (SalesRecord (1) i) Write a complete definition for the function readRecord to read the salesman's id, name and quarterly sales. ii) Write a proper call statement to the function readRecord to fill in the array salesRep. b) The member totalAnnual of SalesRecord is used to hold the information about the total amount of yearly sales of each salesman respectively. The calculation of the total sale is accomplished by the following function: double getAnnualsale (double quarterlysales[]) double total = 0.0: for (int i=0; i" > id; searchRecord - gatsalesman (salesRep, id)

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!