Skip to content

Area of Circle

Choose a tag to compare

@divyaskesavan divyaskesavan released this 22 Feb 15:55
· 2 commits to main since this release
24f788f

import java.util.Scanner;

public class AreaOfCircle {
public static void main(String[] args) {
double radius, area;
Scanner sc = new Scanner(System.in);
System.out.println("Enter the Radius of the Circle:");
radius = sc.nextDouble();
area = Math.PI * Math.pow(radius, 2);
System.out.println("Area of Circle: " + area);
}
}