Advertisement
Guest User

Untitled

a guest
Aug 26th, 2016
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3.  
  4.  
  5. public class Circle {
  6.  
  7.  
  8. public static void main(String[] args) {
  9.  
  10.  
  11.  
  12. Scanner input = new Scanner(System.in);
  13. System.out.println("Enter Radius");
  14. double number = input.nextDouble();
  15. double area = number*number*Math.PI;
  16. System.out.printf("The circle with the radius of %f has area of: %.2f", number, area );
  17.  
  18.  
  19.  
  20. }
  21.  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement