Find Area Circle Program in Java
Area of Circle = (22/7) X radius x radius
import java.util.Scanner;
public class JavaFindAreaCircle
{
public static void main(String[] args)
{
float area,pi,r;
pi=(float)22/7;
Scanner sc=new Scanner(System.in);
System.out.print("Enter radius=");
r=sc.nextFloat();
area=(float)pi*r*r;
System.out.println("Area of Circle="+area);
}
}
Output:
Enter radius=5 Area of Circle=78.57143b. tech. bca icse java java tutorials learn java mca programs