subject

The cost to ship a package is a flat fee of 75 cents plus 25 cents per pound.
1. declare a constant named cents_per_pound and initialize with 25.
2. get the shipping weight from user input storing the weight into shipweightpounds.
3. using flat_fee_cents and cents_per_pound constants, assign shipcostcents with the cost of shipping a package weighing shipweightpounds.

import java. util. scanner;

public class shippingcalculator {
public static void main (string [] args) {
scanner scnr = new scanner(system. in);
int shipweightpounds;
int shipcostcents = 0;
final int flat_fee_cents = 75;

/* your solution goes here */

system. out. println("weight(lb): " + shipweightpounds);
system. out. println("flat fee(cents): " + flat_fee_cents);
system. out. println("cents per pound: " + cents_per_pound);
system. out. println("shipping cost(cents): " + shipcostcents);
}
}

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:00
How is the number 110 written when expanded out to place values in the base 2 (binary) number system? options: 2 x 4 + 3 x 2 + 4 x 1 1 x 2 + 1 x 2 + 0 x 2 1 x 100 + 1 x 10 + 0 x 1 1 x 4 + 1 x 2 + 0 x 1
Answers: 1
question
Computers and Technology, 23.06.2019 01:30
How do you set up a slide show to play continuously, advancing through all the slides without requiring your interaction? a. click set up slide show, and then select the loop continuously until ‘esc' and show without narration options. b. click set up slide show, and then select the loop continuously until ‘esc' and use timings, if present options. c. click set up slide show, and then select the show presenter view and use timings, if present options. d. click set up slide show, and then select the show without animation and browsed at a kiosk (full screen) options.
Answers: 3
question
Computers and Technology, 23.06.2019 03:50
Iam a bacterium. i cause stomach cramps and diarrhea. i am caused by eating rotten foodssuch as chicken, fish, or eggs. sometimes turtles carry my bacteria.what am i?
Answers: 2
question
Computers and Technology, 24.06.2019 08:30
Formatting rows and columns is similar to cell formatting. in an openoffice calc spreadsheet, you can format data entered into rows and columns with the of the rows and columns options. you can insert rows and columns into, or delete rows and columns from, a spreadsheet. use the insert or delete rows and columns option on the insert tab. alternatively, select the row or column where you want new rows or columns to appear, right-click, and select insert only row or only column options. you can hide or show rows and columns in a spreadsheet. use the hide or show option on the format tab. for example, to hide a row, first select the row, then choose the insert tab, then select the row option, and then select hide. alternatively, you can select the row or columns, right-click, and select the hide or show option. you can adjust the height of rows and width of columns. select row and then select the height option on the format tab. similarly, select column, then select the width option on the format tab. alternatively, you can hold the mouse on the row and column divider, and drag the double arrow to the position. you can also use the autofit option on the table tab to resize rows and columns.
Answers: 1
You know the right answer?
The cost to ship a package is a flat fee of 75 cents plus 25 cents per pound.
1. declare a co...
Questions
question
Mathematics, 09.06.2021 01:00
question
Mathematics, 09.06.2021 01:00
question
Arts, 09.06.2021 01:00
Questions on the website: 13722361