TY both, I prolly had been sitting for days wondering what was wrong otherwize...
Anyways, I'm at home now, and I've changed somethings, and this is what I've got right now..
public class Task4
{
public static void main (String[] args)
{
int i;
for( i=200; i>=100; i--);
{
if (i%2==0)
System.out.println(+i);
else
System.out.print("");
}
}
}
now, the thingie is that in the line:
if (i%2==0)
i don't want ==. I wan't to state that if it does NOT equal 0, then ...
Is there anyway to state the oposite to equals?
As you all know, I'm fairly new to this, and I'm not english speaking so forgive me if i might mislead you sometimes
If I didn't say earlier, the point of this is to output any prime number between 100 and 200. I got this hint from my teacher;
"Any number which divides exactly in 8 is a factor if 8. The factors of 8 are 1, 2, 4 and 8. If a number(x) is a factor of another(y) then y % x = 0. A prime number has just two different factors, itself and 1."