Previous
0 / 15
Module DEMO-33-68DEMO-OOP-33

Count Above Threshold Method

DEMO-OOP-33 โ€ข Object Oriented Programming

Browser-only practice

Problem Statement

Read five integers and a threshold, implement countAbove, and print how many values are strictly greater than the threshold.

Input Format

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

  1. value 1
  2. value 2
  3. value 3
  4. value 4
  5. value 5
  6. threshold

Output Format

Print the exact report in this order:

  1. Above Threshold

Sample Testcases

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

Sample #1
Public sample
1
5
7
2
9
4
Above Threshold: 3
Input: value 1 = 1, value 2 = 5, value 3 = 7, value 4 = 2, value 5 = 9, threshold = 4.
Key calculation(s): count = 0 | count++ | "Above Threshold: " + result = "Above Threshold: 3".
Output:
Above Threshold: 3
Sample #2
Public sample
10
20
30
40
50
25
Above Threshold: 3
Input: value 1 = 10, value 2 = 20, value 3 = 30, value 4 = 40, value 5 = 50, threshold = 25.
Key calculation(s): count = 0 | count++ | "Above Threshold: " + result = "Above Threshold: 3".
Output:
Above Threshold: 3

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