Advertisement
shawonrog

Rectanguler

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