Question 9 - Remainder question

I need help on question 9. It says to have a remainder of 2 and I’m putting the code below 5/3 would have a remainder of 2 but it says error.

public class Modulo {
public static void main(String args) {

	int myRemainder 5 % 3 = 
	System.out.println(myRemainder);

}

}

Try this:

int myRemainder = 5 % 3;
System.out.println(myRemainder);

myRemainder doesn’t have the value 2. Change the syntax here:

to:

int myRemainder = 5 % 3;
1 Like

2 % 24 that should work

1 Like

It did work! Thanks a ton!!