answersLogoWhite

0


Best Answer

let s1,s2,s3 be three sides of a triangle.

import java.lang.*;

import java.io.*;

import java.util.*;

class Triangle

{

public static void main(String args[])

{

boolean test=false;

int s1,s2,s3;

Scanner input = new Scanner(System.in);

System.out.println("enter the side1 of triangle");

s1=input.nextInt();

System.out.println("enter the side2 of triangle");

s2=input.nextInt();

System.out.println("enter the side3 of triangle");

s3=input.nextInt();

if((s1*s1)==(s2*s2)+(s3*s3))

{

test=true;

}

else if((s2*s2)==(s1*s1)+(s3*s3))

{

test=true;

}

else if((s3*s3)==(s1*s1)+(s2*s2))

{

test=true;

}

if(test==true)

System.out.println("Entered sides form a right angle triangle.....");

else

System.out.println("Entered sides dosn't form a right angle triangle.....");

}

}

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a program to print a right angle triangle containing digit in java?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What do you call a triangle containing one obtuse angle?

A triangle containing an obtuse angle is an obtuse triangle.


What is a triangle containing a right angle called?

A right angle triangle.


What is a triangle containing a 90 degrees angle?

A triangle with a 90° angle is called a "right triangle."


A triangle containing one obtuse angle?

Obtuse triangle


What is a triangle called containing a right angle?

It is a right triangle or right-angled triangle. The right-angle is 90 degrees.


What kind of triangle is 45 degrees?

45 degrees is an angle, not a triangle.A triangle containing an angle of 45 degrees can be any kind of triangle except an equilateral triangle.


If a triangle has a right angle it is a right triangle Iff if and only if a triangle has a right angle it is a right triangle?

This is one of those instances where US terminology causes totally unnecessary confusion. The original description of a triangle containing a 90o angle is "a right-angled triangle".


A triangle containing 1 right angle and 2 congruent acute angles is called?

A triangle with 1 right angle and 2 congruent acute angles is both a right triangle and an isosceles triangle.


What is a triangle with a perpindicular segment from the vertex to the line containing the side opposite the vertex?

A right angle triangle perhaps


How do you calculate sine?

The sine of an angle of a right triangle - which is a triangle containing one 90o angle - is calculated as the length of the side opposite the angle divided by the length of the hypotenuse. For very small values of x, sin(x) is approximately equal to x.


Calculute the area of triangle with 10cm and 30degrees at one angle?

Write the question out properly Write the question out properly


Does a right angle triangle have 90 degree angle?

Yes. That is why it is called a right angle triangle!Yes. That is why it is called a right angle triangle!Yes. That is why it is called a right angle triangle!Yes. That is why it is called a right angle triangle!