write a Java program for finding the area of a circle
Answers
Answered by
0
Static Method:
import java.util.Scanner;
class AreaOfCircle
{
public static void main(String args[])
{
Scanner s= new Scanner(System.in);
System.out.println("Enter the radius:");
double r= s.nextDouble();
double area=(22*r*r)/7 ;
System.out.println("Area of Circle is: " + area);
}
}
output:
Enter the radius :
7
Area of circle : 154.0
Similar questions
Math,
3 hours ago
Math,
3 hours ago
Math,
3 hours ago
Chemistry,
5 hours ago
Physics,
5 hours ago
Psychology,
8 months ago
India Languages,
8 months ago
Science,
8 months ago