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

Triangle Type

DEMO-OOP-33 โ€ข Object Oriented Programming

Browser-only practice

Problem Statement

Read three side lengths and print the triangle type.

Input Format

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

  1. first side
  2. second side
  3. third side

Output Format

Print the exact report in this order:

  1. Type

Sample Testcases

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

Sample #1
Public sample
3
3
3
Type: EQUILATERAL
Input: first side = 3, second side = 3, third side = 3.
Key calculation(s): String type | if (3 == 3 && 3 == 3) { | "Type: " + type = "Type: EQUILATERAL".
Output:
Type: EQUILATERAL
Sample #2
Public sample
4
4
2
Type: ISOSCELES
Input: first side = 4, second side = 4, third side = 2.
Key calculation(s): String type | if (4 == 4 && 4 == 2) { | "Type: " + type = "Type: ISOSCELES".
Output:
Type: ISOSCELES

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