Write a function displayReport(int arr[]) to display the report required by the CEO. To test both functions, write a main function along with an array of size 10 to store points earned by the 10 riders.
Write a C program.
FoodPanda delivery service wants to appraise their riders by adding increments to the basic salaries. The amount of increment depends upon the feedback points earned by the riders during food deliveries. Maximum points earned by a rider are 1000, below table explains the percentage of increment based on the points earned. Write a function calculateBonus (float, float) that receives basic salary and points earned against a rider and returns its updated salary.
Points Earned |
Percentage of Increment |
0-200 |
0% |
201-500 |
4% |
501- 600 |
6% |
601- 800 |
8% |
801 - 1000 |
10% |
Similarly, to analyze performance of riders, the CEO of FoodPanda wants a report of riders based on the points earned to identify best and worst and average riders. Below table explains ranking criteria for that:
Points Earned |
Ranks |
0-200 |
Worst |
201-600 |
Average |
601-1000 |
Best |
Write a function displayReport(int arr[]) to display the report required by the CEO. To test both functions, write a main function along with an array of size 10 to store points earned by the 10 riders.
Step by step
Solved in 2 steps with 4 images