Write an expression that evaluates to true if the value of the integer variable widthOfBox is not divisible by the value of the integer variable widthOfBook. Assume that widthOfBook is not zero. ("Not divisible" means has a remainder.)

Respuesta :

ijeggs

Answer:

int widthOfBox; //declaration

int widthOfBook; // declaration

if (widthOfBox%widthOfBook!=0){

}

Explanation:

This expression will evaluate to true if the value of widthOfBox is not divisible by widthOfBook.

The modulo operator (%) is used for this evaluation since widthOfBox %widthOfBook will evaluate to zero if the widthOfBox is divisible by  widthOfBook