area of a circle in java programming

Solutions on MaxInterview for area of a circle in java programming by the best coders in the world

showing results for - "area of a circle in java programming"
Elyes
06 Sep 2020
1import java.util.Scanner;
2
3public class Main {
4    public static void main(String[] args){
5        double R,A;
6        Scanner sc = new Scanner(System.in);
7        R = sc.nextDouble();
8        A = 3.14159 * R * R;
9        System.out.printf("A=%.4f\n",  A);
10   }
11}