Advertisement
Guest User

Untitled

a guest
Sep 20th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.58 KB | None | 0 0
  1.  
  2. public class circles
  3. {
  4.     public static void main(String[] args) {
  5.        
  6.         double Radius = 3.712;
  7.         double circumference = (Math.PI * 2 * Radius);
  8.         double area = (Math.PI * Radius * Radius);
  9.        
  10.         circumference = (double)Math.round(circumference * 100d) / 100d;
  11.         area = (double)Math.round(area * 100d) / 100d;
  12.        
  13.         System.out.println("The Radius of the circle = " + Radius);
  14.         System.out.println("The Area of the circle = " + area);
  15.         System.out.println("The Circumference of the circle = " + circumference);
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement