Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- import java.lang.Math.*;
- import java.io.*;
- import java.util.*;
- public class JavaClass {
- public static void main(String[] args) {
- double area;
- double r;
- Scanner input = new Scanner(System.in);
- System.out.print("Enter pls r (radius): ");
- r = input.nextDouble();
- area = Math.PI * r * r;
- double length = Math.PI * 2 * r;
- System.out.println("Area: " + area);
- System.out.println("lenght of circle: " + length);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement