Java
Write an expression that computes the average of the values 12 and 40.
LANGUAGE: JAVA CHALLENGE: Write an expression that computes the average of the values 12 and 40.
Read MoreWrite an expression that computes the remainder of the variable principal when divided by the variable divisor. (Assume both are type int.)
LANGUAGE: JAVA CHALLENGE: Write an expression that computes the remainder of the variable principal when divided by the variable divisor. (Assume both are type int.)
Read Morewrite 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.)
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 MoreGiven the variable pricePerCase, write an expression corresponding to the price of a dozen cases.
LANGUAGE: JAVA CHALLENGE: Given the variable pricePerCase, write an expression corresponding to the price of a dozen cases.
Read MoreGiven the variables fullAdmissionPrice and discountAmount (already declared and assigned values), write an expression corresponding to the price of a discount admission.
LANGUAGE: JAVA CHALLENGE: Given the variables fullAdmissionPrice and discountAmount (already declared and assigned values), write an expression corresponding to the price of a discount admission.
Read MoreWrite an expression that computes the difference of the variables endingTime and startingTime.
LANGUAGE: JAVA CHALLENGE: Write an expression that computes the difference of the variables endingTime and startingTime.
Read MoreGiven the variables taxablePurchases and taxFreePurchases (already declared and assigned values), write an expression corresponding to the total amount purchased.
LANGUAGE: JAVA CHALLENGE: Given the variables taxablePurchases and taxFreePurchases (already declared and assigned values), write an expression corresponding to the total amount purchased.
Read MoreWrite a single expression whose value is the length of this wall.
LANGUAGE: JAVA CHALLENGE: A wall has been built with two pieces of sheetrock, a smaller one and a larger one. The length of the smaller one is stored in the variable small. Similarly, the length of the larger one is stored in the variable large. Write a single expression whose value is the length of this wall.
Read MoreWrite an expression that computes the sum of two variables verbalScore and mathScore (already declared and assigned values).
LANGUAGE: JAVA CHALLENGE: Write an expression that computes the sum of two variables verbalScore and mathScore (already declared and assigned values).
Read MoreWrite a literal corresponding to the value of the first 6 digits of PI (“three point one four one five nine”).
LANGUAGE: JAVA CHALLENGE: Write a literal corresponding to the value of the first 6 digits of PI (“three point one four one five nine”).
Read MoreWrite a literal corresponding to the floating point value one-and-a-half.
LANGUAGE: JAVA CHALLENGE: Write a literal corresponding to the floating point value one-and-a-half.
Read MoreWrite a hexadecimal integer literal representing the value fifteen.
LANGUAGE: JAVA CHALLENGE: Write a hexadecimal integer literal representing the value fifteen.
Read More