Computer Science, asked by 16191, 4 months ago

write java program to find type of triangle , accept user input for a,b,c>0

conditions must be met :

Acute : a + b > c where a 90

Right angled : a + b = c , where a

Answers

Answered by BrainlyProgrammer
0

\huge\star\underbrace{\mathtt\red{⫷❥ᴀ᭄} \mathtt\green{n~ }\mathtt\blue{ §} \mathtt\purple{₩}\mathtt\orange{Σ} \mathtt\pink{R⫸}}\star

import java. util. *;

class code

{

public static void main (String ar[])

{

Scanner sc=new Scanner (System.in)

System.out.println("Enter angles of the triangle") ;

int a=sc.nextInt() ;

int b=sc.nextInt() ;

int c=sc.nextInt() ;

if((a+b+c)==180) //using property of sum of interior { //angle=180

if(((a+b) >c)ll((b+c)>a)ll((a+c)>b))

System.out.println("Acute angled triangle ") ;

else if((a+b)==c) ll((b+c)==a) ll((c+a)==b)

System.out.println (" Right angled triangle") ;

}

else

System. out. println ("Triangle not possible ") ;

}

}

Similar questions