×

# AVHNTRI - Editorial

Author: Amit Kumar Pandey
Editorialist: Arkapravo Ghosh

CAKEWALK

Math

# PROBLEM:

The three angles of a triangle is given. It is required to find if the triangle is right-angled, obtuse or acute triangle.

# EXPLANATION:

An acute triangle is a triangle with all three angles acute (less than 90°).
An obtuse triangle is one with one obtuse angle (greater than 90°) and two acute angles.
A right-angled triangle is a triangle with one right angle(equal to 90°) and two acute angles.
Since a triangle's angles must sum to 180°, no triangle can have more than one obtuse angle.
You just need to check the angles of the triangle and output the type of the triangle. If an angle of the triangle is equal to 90° then output "right", if an angle is greater than 90° then output "obtuse" else output "acute".
You can find the author's solution and my solution below. Hope this helps.:)

# AUTHOR'S AND EDITORIALIST'S SOLUTIONS:

Author's solution can be found here.
Editorialist's solution can be found here.

# RELATED PROBLEMS:

This question is marked "community wiki".

3436
accept rate: 21%

 toggle preview community wiki:
Preview

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• image?![alt text](/path/img.jpg "title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported
• mathemetical formulas in Latex between \$ symbol

Question tags:

×877
×81
×23
×7
×4

question asked: 09 Jun '18, 21:08

question was seen: 69 times

last updated: 09 Jun '18, 21:08