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

Temperature Alert

DEMO-OOP-33 โ€ข Object Oriented Programming

Browser-only practice

Problem Statement

Read one temperature value and classify it as COLD, MILD, or HOT.

Input Format

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

  1. temperature value

Output Format

Print the exact report in this order:

  1. Status

Sample Testcases

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

Sample #1
Public sample
5
Status: COLD
Input: temperature value = 5.
Key calculation(s): String status | status = "COLD" | "Status: " + status = "Status: COLD".
Output:
Status: COLD
Sample #2
Public sample
18
Status: MILD
Input: temperature value = 18.
Key calculation(s): String status | status = "COLD" | "Status: " + status = "Status: MILD".
Output:
Status: MILD

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