Computer Science, asked by mb092298, 9 months ago

Write a program to input length of 3 sides of a triangle. Then check if these sides will form an triangle or not

Answers

Answered by shivamnagar2005
0

import java.util.*;

class triangle

{

public static void main (int a,int b,int c)

{

Scanner in = new Scanner (System.in);

Double sum = a+b+c;

if(sum==180&&a>0&&b>0&&c>0)

System.out.println("The triangle is possible ");

else

System.out.println("The triangle is not possible ");

}

}

Similar questions