Write a program to find the radius of a circle which has the same area as the triangle with the sides (5cm, 7cm, 8 cm) have. Using JAVA
Answers
Answered by
0
package My_Program;
public class Main {
public static void main(String[] args) {
// Calculating the area of the triangle
double s1 = 5, s2 = 7, s3 = 8;
double p = (s1+s2+s3)/2;
double area = Math.sqrt(p*(p-s1)*(p-s2)*(p-s3));
// Calculating the radius of the circle
// from the area of the triangle, as they are same
double radius = Math.sqrt(7 * area / 22);
// Printing the radius of the circle
System.out.println("Radius of the circle: " + radius);
}
}
Similar questions
Math,
2 months ago
World Languages,
3 months ago
English,
3 months ago
Social Sciences,
11 months ago
Math,
11 months ago
Computer Science,
11 months ago