write a program in java to accept the perimeter of a circle from user and then compute its area
Answers
Answered by
2
Answer:
public class Exercise11 {
private static final double radius = 7.5;
public static void main(String[] args) {
double perimeter = 2 * Math.PI * radius;
double area = Math.PI * radius * radius;
System.out.println("Perimeter is = " + perimeter);
System.out.println("Area is = " + area);
}
}
Similar questions
Computer Science,
2 months ago
Math,
2 months ago
Hindi,
4 months ago
CBSE BOARD X,
4 months ago
Math,
10 months ago
History,
10 months ago