Computer scienceSystem administration and DevOpsCommand lineBash syntax

Conditional statements and test checks

Angles of triangle

Report a typo

Given the measurements of 3 angles in degrees as parameters to the solve() function, determine if they can form a triangle or not. If they can form a triangle, print Yes. If they cannot form a valid triangle, print No.

The arithmetic operators +, -, *, / are used for addition, subtraction, multiplication, and division in Bash the same way they are used in other programming languages. You can use $(( $1 + $2 + $3 )) for bash arithmetic expansion.

Tip: The sum of all angles of a triangle is 180 degrees.

Sample Input 1:

35 55 90

Sample Output 1:

Yes
Write a program in Shell
#!/usr/bin/env bash

solve() {
# add your solution here

}
___

Create a free account to access the full topic