Calculate the average (as a double ) of the values contained in the integer variables num1, num2, num3 and assign that average to the double variable avg.

Java

LANGUAGE: JAVA CHALLENGE: Calculate the average (as a double ) of the values contained in the integer variables num1, num2, num3 and assign that average to the double variable avg. Assume the variables num1, num2, and num3 have been declared and assigned values, and the variable avgdeclared.

Read More

write an expression corresponding to the cost per rider (assuming the bus is full). (Do not worry about any fractional part of the expression — let integer arithmetic, with truncation, act here.)

Java

LANGUAGE: JAVA CHALLENGE: Given the variables costOfBusRental and maxBusRiders of type int, write an expression corresponding to the cost per rider (assuming the bus is full). (Do not worry about any fractional part of the expression — let integer arithmetic, with truncation, act here.)

Read More