please do keep in mind I am a brand new computer programmer and I am very stuck on this program I have to write. I already had asked a question earlier and got some great feedback and it's almost complete. The problem I am having is that in the program I am using a for a loop but technically I am only supposed to use while loops and am having major compile issues when trying to revert it to a while loop. Here is an example of the code.
import java.util.Scanner;
public class Harrison5a1
{
public static void main(String[] args)
{
Scanner input = new Scanner(System.in);
int integerx;
System.out.print("Enter an even integer x: ");
integerx = input.nextInt();
while (integerx % 2 != 0)
{
System.out.print("Try again, enter an even integer x: ");
integerx = input.nextInt();
}
for (int x = 4; x <= integerx; x += 4)
{
System.out.println("4 is a multiple of " + x);
}
}
}