Advertisement
Timur69

Circle

Mar 30th, 2020
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.47 KB | None | 0 0
  1. package Tasks;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class Circle {
  6.     public static void main(String[] args) {
  7.         System.out.println("Введите радиус окружности 2 ");
  8.         Scanner scanner = new Scanner(System.in);
  9.         double radius = scanner.nextDouble();
  10.         System.out.println("Площадь круга " + Math.PI * Math.pow(radius, 2));
  11.         System.out.println("Длина окружности " + 2 * Math.PI * radius);
  12.     }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement