Learn Java( Math: % )


i just started today on code academy. i chose the java coding program and i got stuck on the ninth step. can anyone help me? Please… my code is this: int myRemainder = 14 % 7 i need to get a remainder of 2 which 2 numbers should i use??

int myRemainder = 14 % 7


Yep! Just give me a second to find the exact lesson for that code and I will try and explain what you should do to get your desired result! :smiley:


thank you… waiting…


but, i got stuck in the 11nth lesson now.


So the key part to this lesson is you need the remainder of two numbers to equal 2 not just two numbers divided by each other to equal 2. If you were just dividing two numbers to equal 2 you could use 14 % 7 or 4 % 2 or etc. However, we want a remainder of 2. So now you just need to find 2 numbers that when divided by each other come up with a remainder of 2.


You can make another topic for that question and me or someone else can help you on that one as welll :+1:


thanks a lot… u helped me but i figured it out


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.