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

Casting Average

DEMO-OOP-33 โ€ข Object Oriented Programming

Browser-only practice

Problem Statement

Read two integer marks and print the average as a double with two decimals.

Input Format

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

  1. first mark
  2. second mark

Output Format

Print the exact report in this order:

  1. Average

Sample Testcases

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

Sample #1
Public sample
80
91
Average: 85.50
Input: first mark = 80, second mark = 91.
Key calculation(s): average = (80 + 91) / 2.0 | "Average: " + String.format("%.2f", average) = "Average: 85.50".
Output:
Average: 85.50
Sample #2
Public sample
75
76
Average: 75.50
Input: first mark = 75, second mark = 76.
Key calculation(s): average = (75 + 76) / 2.0 | "Average: " + String.format("%.2f", average) = "Average: 75.50".
Output:
Average: 75.50

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