Computer Science, asked by blah92, 1 year ago

A triangle is said to be an 'Equable Triangle', the area of the triangle is equal to its perimeter . Write a program to enter three sides of a triangle . check and print whether the triangle is equable or not​

Answers

Answered by aqibkincsem
25

Answer:

Exp"public class Triangle

{

public static void main(String args[])

{

double s1, s2, s3, s4, area;

Scanner s = new Scanner(System.in);

System.out.print(""Enter the first side :"");

s1 = s.nextDouble();

System.out.print(""Enter the second side :"");

s2 = s.nextDouble();

System.out.print(""Enter the third side :"");

s3 = s.nextDouble();

s4 = (s1 + s2 + s3 )/ 2 ;

area = Math.sqrt(s4 * (s4 - s1) * (s4 - s2) * (s4 - s3));

System.out.print(""Area of Triangle is:""+area+"" sq units"");

}

}

Answered by jaimangaldorai
8

Answer:

see your answer it is correct

Attachments:
Similar questions