Mrumbros's Posts
Nairaland Forum › Mrumbros's Profile › Mrumbros's Posts
1 (of 1 pages)
Write a C program that reads the first names of up to 10 salesmen (saleswomen), their respective genders (m=male or f=female ), as well as their total sales for the last three months. You should stop reading when the name Enough is entered. Your program should then find the average sales for each of the salesmen (saleswomen) and print the following to the screen: - The names of the salesmen (saleswomen) and the average sales for each sorted in descending order based on the sales avg. - The total average sales for males and the total average sales for females. Example of a Sample Run: Enter the name, gender and three month sales: john m 200 250 300 sara f 300 500 200 adam m 500 600 700 lisa f 100 200 350 bella f 50 70 200 Enough The following is the average sales sorted in descending order: adam 600.00 sara 366.66 John 250.00 lisa 216.66 bella 106.66 Total average sales for males = 425.00 Total average sales for females = 218.88 |
1 (of 1 pages)