Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. Scanner input = new Scanner( System.in );
  2. System.out.print("Enter length: ") ;
  3. double l = input.nextDouble();
  4. System.out.print("Enter Width: ");
  5. double w = input.nextDouble();
  6. System.out.print("Enter Height: ");
  7. double h = input.nextDouble();
  8. System.out.print("Enter Weight: ");
  9. double w1 = input.nextDouble();
  10. System.out.print("Enter Zip Code: ");
  11. double zp = input.nextDouble();
  12. System.out.print("Enter Surcharge: ");
  13. double sc = input.nextDouble();
  14. double charge = zp * sc;
  15. double area = l * w * h * w1;
  16. System.out.print("Cost of shipping: " + charge);
  17. if (w1 < 5)
  18. System.out.print("");
  19.  
  20. if (5.1 < area && area < 15);
  21. System.out.print("");
  22.  
  23. if (15.1<area && area<34);
  24. System.out.print("");
  25. if (34.1<area && area<45);
  26. System.out.print("");
  27. if (45.1<area && area<60);
  28. System.out.print("");
  29. if (area > 60);
  30. System.out.print("");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement