Previous Next
0 / 15
Module DEMO-33-66DEMO-OOP-33

Average And Above Count

DEMO-OOP-33 โ€ข Object Oriented Programming

Browser-only practice

Problem Statement

Read five scores, compute their average, and count how many scores are strictly above the average.

Input Format

Input is given as whitespace-separated tokens in this order:

  1. first score
  2. second score
  3. third score
  4. fourth score
  5. fifth score

Output Format

Print the exact report in this order:

  1. Average
  2. Above Average

Sample Testcases

Submit runs every public testcase in this browser. Results and code never leave this device.

Sample #1
Public sample
10
20
30
40
50
Average: 30.00
Above Average: 2
Input: first score = 10, second score = 20, third score = 30, fourth score = 40, fifth score = 50.
Key calculation(s): values = {10, 20, 30, 40, 50} | sum = 0 | "Average: " + String.format("%.2f", average) = "Average: 30.00".
Output:
Average: 30.00
Above Average: 2
Sample #2
Public sample
5
5
5
5
5
Average: 5.00
Above Average: 0
Input: first score = 5, second score = 5, third score = 5, fourth score = 5, fifth score = 5.
Key calculation(s): values = {5, 5, 5, 5, 5} | sum = 0 | "Average: " + String.format("%.2f", average) = "Average: 5.00".
Output:
Average: 5.00
Above Average: 0

Web terminal

C, C++, Java, and Python run locally in a browser VM. No worker or visualizer is used.

Saved in this browser
Editor settings