Computer Science, asked by siddhimedhane06, 5 hours ago

write a Java program for finding the area of a circle​

Answers

Answered by agnibhapal6677
0

Static Method:

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);      

  }

}

output:

Enter the radius :

7

Area of circle : 154.0

Similar questions