You want to calculate the radius of a circle by using the formula
Write a program in java to calculate and display the radius of a circle by taking area as input.
Answers
Answered by
8
import java.util.*;
public class Brainly
{
public static void main (String args[])
{
Scanner sc= new Scanner (System.in);
System.out.println("enter area of circle");
double area = sc.nextDouble( );
double radius = Math.sqrt(7 * area/22);
System.out.println("Radius of circle =" + radius);
}
}
___________________________
I've taken 154 as input while executing the program and received the correct output.
Attachments:
Similar questions