Yes I am new to learning java. I am just learning loops. For my online college class I have to write a program using the for loops. This program needs to give all even numbers between 0-100. I have a program written that gives me all numbers 1-100. Can anyone help me solve where need to do to make it give me even numbers? Here is what I have so far.
public class for2{
public static void main(String[] args){
for(int x = 2; x < 101; x++)
{
System.out.println("x =" + x);
}
}
}
Like I say it gives me all numbers when I need even numbers. So any help would be nice and thank you.