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