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.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter6: Modularity Using Functions
Section6.2: Returning A Single Value
Problem 13E
icon
Related questions
Question

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.

Expert Solution
steps

Step by step

Solved in 2 steps with 4 images

Blurred answer
Knowledge Booster
Returning value from Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning