Answers for "java code for circle are"

0

area of circle in java

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        final  float PI = 3.14f;
        Scanner scanner = new Scanner(System.in);

        System.out.print("Enter radius of circle: ");
        int radius = scanner.nextInt();

        double areaOfCircle = PI * Math.pow(radius,2);

        System.out.printf(" Area of circle of circle is %.2f ",areaOfCircle);
    }
}
Posted by: Guest on June-23-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language