public class Main
{
public static void main(String[]args)
{
int y = 12;
int z = 0;
for (int index = 0; index <= y; index++)
{
if ((index % 3 == 0) && (index % 2 == 0))
{
z--;
}
else
{
z++;
}
}
System.out.println(z);
}
Does Java go through the (index % 3 == 0) & (index % 2 == 0)
or just the first one - (index % 3 == 0)?
I don't know.. lol.