Math, asked by Jaaava, 1 year ago

a program for generating area of circle

Answers

Answered by Anonymous
7
Heya.....❤️❤️

★ ★ ★ ★ ★ ★ ★ ★

class AreaofCircle{
   public static void main()
   {
     {
     int r = 7;
     int Area = 22/7 * 7 * 7;
     System.out.println("Area of circle = " + Area);

     }
     }
   }

        Output

Area of circle = 154

____________________________________________________________________________________

Java is a predifined computer specialized coding.

Java follows some rules in the programs.





Answered by Anonymous
3

Answer:

// Java program to find area

// of circle

class Test

{

static final double PI = Math.PI;

static double findArea(int r)

{

return PI * Math.pow(r, 2);

}

// Driver method

public static void main(String[] args)

{

System.out.println("Area is " + findArea(5));

}

Step-by-step explanation:

Similar questions