Hi! I have tried for two hours to fix why this code is not doing anything and I gave up. Please help! the idea is to write a program that prints out the even numbers from 0 to 500 (including the number 500) using a while loop.
public class EvensWhile extends ConsoleProgram
{
public static void main(String[] args)
// Prints out the even numbers from 0 .. 500
{
int i = 0;
while (i <= 500)
{
System.out.println(i * 2);
i++;
}
}
}