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 15:00
The three logical operators used to write compound conditions are "and," "or," and "not." a: true b: false
Answers: 2
question
Computers and Technology, 22.06.2019 18:00
Martha is a healer, a healthcare provider, and an experienced nurse. she wants to share her daily experiences, as well as her 12 years of work knowledge, with people who may be interested in health and healing. which mode of internet communication can martha use?
Answers: 3
question
Computers and Technology, 23.06.2019 18:00
Which finger presses the h key on the keyboard? index finger on the left hand pinky finger on the right hand index finger on the right hand thumb on the left hand
Answers: 1
question
Computers and Technology, 24.06.2019 22:30
Distinguish between a skill resume and a chronological resume and explain when it is best to use each format
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, 20.08.2019 21:10
question
Mathematics, 20.08.2019 21:10
Questions on the website: 13722360