Program to input the sides of a triangle and check whether it is equilateral scalene or isosceles triangle JAVA


Write a Program to input the sides of a triangle and check whether it is equilateral scalene or isosceles triangle.




import java.util.*;
class oldest
{
    public static void main(String args[])
    {
         Scanner sc = new Scanner(System.in);
         int a = sc.nextInt();
         int b = sc.nextInt();
         int c = sc.nextInt();
         if(a>b && a>c)
     
         System.out.println(+a + " is oldest");
         
         else if(b>a && b>c)
     
         System.out.println(+b + " is oldest");
         
         else
         
         System.out.println(+c + " is oldest");
         
    }
}



     
                     

Contact Us

REACH US

SERVICES

  • CODING
  • ON-LINE PREPARATION
  • JAVA & PYTHON

ADDRESS

B-54, Krishna Bhawan, Parag Narain Road, Near Butler Palace Colony Lucknow
Contact:+ 919839520987
Email:info@alexsir.com