Advertisement
Guest User

Untitled

a guest
Sep 18th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.44 KB | None | 0 0
  1. import java.util.Scanner;
  2. import java.lang.Math.*;
  3. import java.io.*;
  4. import java.util.*;
  5. public class JavaClass {
  6. public static void main(String[] args) {
  7. double area;
  8. double r;
  9. Scanner input = new Scanner(System.in);
  10. System.out.print("Enter pls r (radius): ");
  11. r = input.nextDouble();
  12. area = Math.PI * r * r;
  13. double length = Math.PI * 2 * r;
  14. System.out.println("Area: " + area);
  15. System.out.println("lenght of circle: " + length);
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement