You are here: Home / Topics / Java Program to find area of circle

Java Program to find area of circle

Filed under: Java on 2024-03-05 21:33:32

import java.util.Scanner;
class AreaOfCircle 
{
  public static void main(String args[]) 
   {   
      
     Scanner s= new Scanner(System.in);
       
        System.out.println("Enter the radius:");
        double r= s.nextDouble();
        double  area=(22*r*r)/7 ;
        System.out.println("Area of Circle is: " + area);      
  }
}

About Author:
M
Mr. Dubey     View Profile
Founder of MCQ Buddy. I just like to help others. This portal helps students in getting study material free.