I wish i could play but my strict mom would never let me :’(
Full of emotion and not like a robot
CORRECT QUESTION:
For the given program, how many print statements will execute?
public static void printShippingCharge(double weight) { if((weight > 0.0) && (weight <= 10.0)){ System.out.println(weight * 0.75); }
else if((weight > 10.0) && (weight <= 15.0)) { System.out.println(weight * 0.85); }
else if((weight > 15.0) && (weight <= 20.0)) { System.out.println(weight * 0.95); } }
public static void main(String args[]) {
printShippingCharge(18);
printShippingCharge(6);
printShippingCharge(25); }
Answer:
Two of the print statements will output values
Explanation:
These two calls to the printShippingCharge are the ones that will output values: printShippingCharge(18); and printShippingCharge(6);
The first if statement is true when the value of weight is 6 (weight > 0.0) && (weight <= 10.0)
The Third if statement is true when weight is 18 (weight > 15.0) && (weight <= 20.0)
NOTE: That I made correction to the variable weight. The question isn't consistent with the variable name. It used weight and itemWeight at different points this will lead to a compiller error
Clocks maybe is the answer. I really don’t know
First, input at the end of column A (containing High Priority Customers Sales Out): =sum(A1:A20) This represents the sum of the values from cell A1 to cell A20. Then, to calculate the percentage of each cell in A, input the formula: =(A1/$A$21)*100 This formula will give you the percentage of A1, if you drag the box down to A20, you will have all the percentages of each sale from A1 to A20. Then, format the cell using the percentage number format with no decimal places. Select column D then right click, "format cells" and select number, adjust the number of decimal places. <span />