Write a program in java to input the area of a circle and to calculate the radius of the circle.
Answers
Answered by
11
import java.util.*;
public class Radius
{
public static void main(String args[])
{
Scanner in = new Scanner(System.in);
double a,r;
System.out.println("Enter the area of the circle");
a=in.nextDouble();
r=Math.sqrt(7*a/22);
System.out.println("The radius of the circle is"+r);
}
}
Answered by
5
Hiii MATe ☺☺
Java Program to Calculate and Display Area of a Circle
public class Area.
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);
Similar questions