Monday, 4 July 2016

java program to find the area of a circle

//ComputeArea.java:Compute the area of a circle

public class ComputeArea {
public static void main(String[] args){

 double PI = 3.14159;
double radius = 20;

//Compute area

double area = radius * radius * PI;

//Display result

System.out.println("The area for the circle of radius," + radius  + "is,"   + area);

}
}

1 comment:

  1. Thanks guys.
    feel free to ask any help u need related to IT

    ReplyDelete