Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- import java.lang.Math;
- public class MyClass {
- public static void main(String args[]) {
- Scanner input = new Scanner(System.in);
- double area = input.nextDouble();
- if(area<=0){
- System.out.println("Area cannot be 0 or lower than 0...");
- } else{
- double radius = Math.sqrt(area/Math.PI);
- System.out.println("Circle radius is "+ radius);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement