Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- System.out.print("Enter circle radius | r = ");
- double radius = Double.parseDouble(scanner.nextLine());
- System.out.println("Area of the circle = " + Math.PI *radius*radius);
- System.out.println("Perimeter of the circle = " + Math.PI*2*radius);
- }
- }
Add Comment
Please, Sign In to add comment