Computer Science, asked by samo2890000, 9 months ago

You want calculate the radius of a circle by using the formula. Area= 22/7 r square , where r=radius of the circle. Hence the radius can be as: r= square root 7× area / 22 . write a program in Java to calculate and display the radius of a circle by taking the area as input.​

Answers

Answered by hardik3332
12

Answer:

\qquad\quad\mathcal{\underline{\underline{ANSWER}}}

ANSWER

import java.util.*;

public class Brainly

{

\quad public static void main (String args[])

\quad \; {

\quad \; Scanner sc= new Scanner (System.in);

\quad \; System.out.println("enter area of circle");

\quad \; double area = sc.nextDouble( );

\quad \; double radius = Math.sqrt(7 * area/22);

\quad \; System.out.println("Radius of circle =" + radius);

\quad }

}

___________________________

I've taken 154 as input while executing the program and received the correct output.

Answered by divyaprakash007
4

Answer:

import java.util.*;

public class Program {

 

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);

 

}

}

Explanation:

Enter area of circle

30

Radius of circle =3.089571903266623

Similar questions