What's the logical error in this Java Program?
import java.util.Scanner;
public class TRIANGLES
{
public static void main(String args[])
{
Scanner in=new Scanner(System.in);
double a,b,c;
System.out.println("The measure of the first angle of the triangle");
a=in.nextDouble();
System.out.println("The measure of the second angle of the triangle");
b=in.nextDouble();
System.out.println("The measure of the third angle of the triangle");
c=in.nextDouble();
if((a+b+c)==180)
{
if((a==90)||(b==90)||(c==90))
{
System.out.println("The triangle is a right-angled TRIANGLE");
}
else if((a 90)||(b>90)||(c>90))
{
System.out.println("The triangle is a obtuse-angled TRIANGLE");
}
}
else {
System.out.println("The angles entered are incorrect. They cannot form a triangle");
}
}
}
Answers
Answered by
1
Answer:
furniture dealer offers 12% discount on a bedroom set and still gains 20% if the marked price is RS.12550 how much does it cost to the dealer.
Similar questions