Advertisement
Guest User

Untitled

a guest
May 19th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. /**
  2. * Created by: Parth
  3. **/
  4.  
  5. public class CircleArea
  6. {
  7. public static void main(String args[])
  8. {
  9. int radius = 5;
  10. System.out.println("Radius of the circle is " +radius);
  11.  
  12. // Note: use Math.PI constant to get value of pi
  13. double area = Math.PI * radius * radius;
  14.  
  15. System.out.println("Area of the Circle is " + area);
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement