ASCEND

Free, Interactive Math and Computer Science Instruction

Home

About

Courses

Events

Forum

Donate

Contact

More

I don't understand why you wrote System.out.println(5 * i); after the if statement.

Great question! The if statement ensures that we are only working with i that are divisible by 7. Remember that we want to print 5 times numbers divisible by 7. Thus, we need to print the value of 5*i after we reach an i that is divisible by 7.

Does that makes sense?

Great question! The if statement ensures that we are only working with i that are divisible by 7. Remember that we want to print 5 times numbers divisible by 7. Thus, we need to print the value of 5*i after we reach an i that is divisible by 7.

Does that makes sense?