shawonrog

Circle

Jan 29th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. package spring18;
  2.  
  3. import java.util.Scanner;
  4.  
  5.  
  6. public class Circle {
  7.  
  8. public static void main(String[] args) {
  9.  
  10. double A,P;
  11. Scanner sc=new Scanner(System.in);
  12. System.out.println("Please Give Your Squre Size:");
  13. double r = sc.nextDouble();
  14. A=3.1416*(r*r);
  15. System.out.println("Area Formula");
  16. System.out.println(A);
  17. System.out.println("Perimeter Formula");
  18. P=2*3.1416*r;
  19. System.out.println(P);
  20. }
  21. }
Add Comment
Please, Sign In to add comment