Find C Language Program Top-Scorer Tomorrow is the closing ceremony for the 2022 World Cup, and as part of the Awarding Team, we have to determine who scored the most goals in the whole tournament and award him/her the Top Scorer Award. Ah, well, I’ve been too busy watching the games this past week so the top scorer ranking of the tournament is super jumbled now. You can find a way to rank them in the order of highest goals to lowest goals, right? Great! Gotta go watch the next game, bye! Output The first line will contain a message prompt to input the number of goal-scorers. The succeeding lines will contain message prompts to input the goals scored for each player. The next succeeding lines will contain the goals ranked from highest to lowest. Enter the number of goal-scorers: 6 Score of player #1: 21 Score of player #2: 42 Score of player #3: 33 Score of player #4: 56 Score of player #5: 24 Score of player #6: 12 Highest to lowest: Player #1: 56 Player #2: 42 Player #3: 33 Player #4: 24 Player #5: 21 Player #6: 12
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
Find C Language Program
Top-Scorer
Tomorrow is the closing ceremony for the 2022 World Cup, and as part of the Awarding Team, we have to determine who scored the most goals in the whole tournament and award him/her the Top Scorer Award. Ah, well, I’ve been too busy watching the games this past week so the top scorer ranking of the tournament is super jumbled now. You can find a way to rank them in the order of highest goals to lowest goals, right? Great! Gotta go watch the next game, bye!
Output
The first line will contain a message prompt to input the number of goal-scorers.
The succeeding lines will contain message prompts to input the goals scored for each player.
The next succeeding lines will contain the goals ranked from highest to lowest.
Enter the number of goal-scorers: 6
Score of player #1: 21
Score of player #2: 42
Score of player #3: 33
Score of player #4: 56
Score of player #5: 24
Score of player #6: 12
Highest to lowest:
Player #1: 56
Player #2: 42
Player #3: 33
Player #4: 24
Player #5: 21
Player #6: 12
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 3 images