Write an expression that computes the integer average of the int variables exam1 and exam2 (both declared and assigned values).

1
Write an expression that computes the integer average of the int variables exam1 and exam2 (both declared and assigned values).

LANGUAGE: JAVA

CHALLENGE:

Write an expression that computes the integer average of the int variables exam1 and exam2 (both declared and assigned values).

SOLUTION:


(exam1 + exam2) / 2

One comment

  • corinne says:

    Each of the walls of a room with square dimensions has been built with two pieces of sheetrock, a smaller one and a larger one. The length of all the smaller ones is the same and is stored in the variable small . Similarly, the length of all the larger ones is the same and is stored in the variable large . Write a single expression whose value is the total area of this room.

Add comment