Ok I am writing a program that has to use for and while loops. This program will have to output a list of even numbers between 1-100. Is this program correct I wrote or what does it need?
public class loops
{
public static void main(String args[]){
var x = 0
while (x<=100){
document.write(x);
x++;
}
{
for(int x = 2; x>0; x++)
{
System.out.println(x);
}
}
}
}