Computer Science, asked by danceloverkate2214, 9 months ago

write a Java Program to store values in three integer variable as the side of a triangle the program should then print whether using three sides of a triangle can you form or not ? if yes then check what kind of triangle it is( equilateral or isosceles or scalene) otherwise print a suitable message...plse do it faassstt it is argent....​

Answers

Answered by vishvraj0611
1

Answer:

import java.util.*;

class tri

{

         public static void main()

       {

              Scanner s = new Scanner(System.in);

              System.out.println("Enter three sides of triangle");

              int a = s.nextInt();

              int b = s.nextInt();

              int c = s.nextInt();

              triangle_type(a,b,c);

                                            }

              static void triangle_type(int x,int y,int z)

             {

                   if(x==y&&y==z)

                   System.out.println("Triangle is equilateral");

                   else if(x==y||y==z||z==x)

                   System.out.println("Triangle in isosceles");

                   else

                   System.out.println("Triangle is scalene");

                                             

Explanation:

It was urgent so I had helped you

Hope it will help you...........Please me mark me as brainliest

Similar questions