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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 19:00, trintrin227
In he example code, what does the title attribute create? a tool tip an element a source a markup
Answers: 1
image
Computers and Technology, 23.06.2019 04:00, china236
In a word processing program, such as microsoft word, which feature to you choose the desired picture enhancement?
Answers: 2
image
Computers and Technology, 23.06.2019 21:30, maddietomlinson113
Examine the list below. which factors positively affect lifetime income? check all that apply.
Answers: 1
image
Computers and Technology, 23.06.2019 23:30, huangjianhe135
The keyboard usually has six rows of keys. which of the following is not one of the key group categories? letter keys number keys control keys graphic keys
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 in other subjects: