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

Highest Number Loop

DEMO-OOP-33 โ€ข Object Oriented Programming

Browser-only practice

Problem Statement

Read five integers into an array and print the maximum value using a loop.

Input Format

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

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

Output Format

Print the exact report in this order:

  1. Maximum

Sample Testcases

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

Sample #1
Public sample
4
8
2
9
1
Maximum: 9
Input: first number = 4, second number = 8, third number = 2, fourth number = 9, fifth number = 1.
Key calculation(s): values = {4, 8, 2, 9, 1} | max = values[0] | "Maximum: " + max = "Maximum: 9".
Output:
Maximum: 9
Sample #2
Public sample
10
10
10
8
7
Maximum: 10
Input: first number = 10, second number = 10, third number = 10, fourth number = 8, fifth number = 7.
Key calculation(s): values = {10, 10, 10, 8, 7} | max = values[0] | "Maximum: " + max = "Maximum: 10".
Output:
Maximum: 10

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