Write a program to input three angles of a triangle and print whether a triangle with such angles will be possible or not.qbasic
Answers
Answered by
0
Answer:
Explanation:
import java.util.*;
class Dcoder
{
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
System.out.println("Enter the three angles");
int a1=sc.nextInt();
int a2=sc.nextInt();
int a3=sc.nextInt();
if((a1+a2+a3)==180)
{
System.out.println("it is a valid triangle");
if(a1<90 && a2<90 && a3<90)
System.out.println("it is an acute angled triangle");
else if(a1>90 || a2>90 || a3>90)
System.out.println("it is an obtuse angled triangle");
else
System.out.println("it is a right angled triangle");
}
else
System.out.println("it is not valid");
}
}
Attachments:
Answered by
0
Answer:
important Java it'll happen again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again
Explanation:
please mark me as a brain list answer please and thanks my answer please anyone of you here good one here in the world please mark me as
Similar questions