Computer Science, asked by Irenejesus, 9 months ago

You want to calculate the radius of a circle by using the formula
area = 22 \div 7r {}^{2}



r =  \sqrt{7 \times area \div 22}
Write a program in java to calculate and display the radius of a circle by taking area as input.​

Answers

Answered by Prakriti0101
8

\qquad\quad\mathcal{\underline{\underline{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.

Attachments:
Similar questions