Write java program to input radius of a circle and print area of circle
Answers
Answered by
2
Answer:
The program output is also shown below.
public class Circle.
int r;
double pi = 3.14, area;
Scanner s = new Scanner(System.
System. out. print("Enter radius of circle:");
r = s. nextInt();
area = pi * r * r;
System. out. println("Area of circle:"+area);
Answered by
3
Answer:
public class Circle
{
public static void main(String[] args)
{
int r;
double pi = 3.14, area;
Scanner s = new Scanner(System.in);
System.out.print("Enter radius of circle:");
r = s.nextInt();
area = pi * r * r;
System.out.println("Area of circle:"+area);
like this...........
Similar questions
Math,
3 months ago
Social Sciences,
3 months ago
Science,
6 months ago
Computer Science,
6 months ago
CBSE BOARD X,
1 year ago
Geography,
1 year ago