Program to find Area of Circle in java.

Program Code:

// Program to find the area of circle.
public class AreaofcirclePFS
{

public static void main(String[] args)
{
double circle_radius=20;        //Radius Given
double pi=3.14159;                //Value of PI
double circle_area=pi*circle_radius*circle_radius;
System.out.println(“\n Area of Circle is = “+ circle_area);

}

}

Output:

Screenshot (6).png

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s