write a java program to accept two angles calculate and display whether they are complementary angles or supplementary angles
Answers
Answered by
0
import java.io.*;
class ANGLES
{
public static void main()throws IOException
{
DataInputStream ak =new DataInputStream(System.in);
System.out.println("ENter two angles in degrees");
int a1=Integer.parseInt(ak.readLine());
int a2=Integer.parseInt(ak.readLine());
if((a1+a2)==90)
{
System.out.println("COMPLIMENTARY ANGLES");
}
else if(a1+a2==180)
{
System.out.println("Supplementary ANGLES");
}
else
{
System.out.println("NEITHER COMPLIMENTARY NOR SUPPLEMENTARY ");
}
}
}
class ANGLES
{
public static void main()throws IOException
{
DataInputStream ak =new DataInputStream(System.in);
System.out.println("ENter two angles in degrees");
int a1=Integer.parseInt(ak.readLine());
int a2=Integer.parseInt(ak.readLine());
if((a1+a2)==90)
{
System.out.println("COMPLIMENTARY ANGLES");
}
else if(a1+a2==180)
{
System.out.println("Supplementary ANGLES");
}
else
{
System.out.println("NEITHER COMPLIMENTARY NOR SUPPLEMENTARY ");
}
}
}
Answered by
0
Answer:
import java.io.*;
class ANGLES
{
public static void main()throws IOException
{
DataInputStream ak =new DataInputStream(System.in);
System.out.println("ENter two angles in degrees");
int a1=Integer.parseInt(ak.readLine());
int a2=Integer.parseInt(ak.readLine());
if((a1+a2)==90)
{
System.out.println("COMPLIMENTARY ANGLES");
}
else if(a1+a2==180)
{
System.out.println("Supplementary ANGLES");
}
else
{
System.out.println("NEITHER COMPLIMENTARY NOR SUPPLEMENTARY ");
}
}
}
Similar questions