Write a Java program to print the area and perimeter of a circleTest Data:Radius = 7.5Expected OutputPerimeter is = 47.12388980384689Area is = 176.71458676442586
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); } }
Sample Output:
Perimeter is = 47.12388980384689 Area is = 176.7145867644258
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Sample Output:
need an explanation for this answer? contact us directly to get an explanation for this answer