Write a Program to input radius of a circle and find Area of a Circle
Answers
Answered by
1
Question:-
- Write a program to input radius of a circle and find the Area of the Circle.
Code:-
import java.util.*;
class Circle
{
public static void main(String s[])
{
Scanner sc=new Scanner(System.in);
System.out.print("Enter the radius: ");
double rad=sc.nextInt();
double area=22.0/7.0 *Math.pow(rad, 2);
System.out.println("The area of the circle is: "+area);
}
}
Answered by
0
CLS
INPUT"enter the radius";
INPUT"enter the area";
Now,
Area=2πr
INPUT"Enter the area";
END
Similar questions
Science,
2 months ago
Social Sciences,
2 months ago
Chemistry,
2 months ago
Social Sciences,
5 months ago
Math,
5 months ago
Science,
9 months ago
English,
9 months ago