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, 23.06.2019 22:30
Lakendra finished working on her monthly report. in looking it over, she saw that it had large blocks of white space. what steps could lakendra take to reduce the amount of white space?
Answers: 3
question
Computers and Technology, 23.06.2019 23:00
Lucas put a lot of thought into the design for his company's new white paper. he made sure to include repeating design elements such as color schemes and decorative images. his goal was to a.add symmetry b.create a unified publication c.provide consistency d.save money
Answers: 1
question
Computers and Technology, 24.06.2019 01:30
How can you make your column headings stand out?
Answers: 1
question
Computers and Technology, 25.06.2019 05:30
Website hosting servers have their own unique ip address, what does this address consist of? a. numbers and letters b. numbers c. letters d. letters and symbols
Answers: 2
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, 12.07.2021 20:10
question
Mathematics, 12.07.2021 20:10
question
Mathematics, 12.07.2021 20:10
question
Health, 12.07.2021 20:10
question
Mathematics, 12.07.2021 20:10
Questions on the website: 13722363