Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Scanner input = new Scanner( System.in );
- System.out.print("Enter length: ") ;
- double l = input.nextDouble();
- System.out.print("Enter Width: ");
- double w = input.nextDouble();
- System.out.print("Enter Height: ");
- double h = input.nextDouble();
- System.out.print("Enter Weight: ");
- double w1 = input.nextDouble();
- System.out.print("Enter Zip Code: ");
- double zp = input.nextDouble();
- System.out.print("Enter Surcharge: ");
- double sc = input.nextDouble();
- double charge = zp * sc;
- double area = l * w * h * w1;
- System.out.print("Cost of shipping: " + charge);
- if (w1 < 5)
- System.out.print("");
- if (5.1 < area && area < 15);
- System.out.print("");
- if (15.1<area && area<34);
- System.out.print("");
- if (34.1<area && area<45);
- System.out.print("");
- if (45.1<area && area<60);
- System.out.print("");
- if (area > 60);
- System.out.print("");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement