/* Program to find the Area of the Circle using pi*r*r formula */
import java.lang.*;
import java.io.*;
class Circlearea
{
public static void main(String args[])
{
float pi=3.14159f,area;
int r=5;
area=pi*r*r;
System.out.println("The area of the circle is:"+area);
}
}
Output:
E:\javamani>java Circlearea
The area of the circle is:78.53975
0 comments:
Post a Comment