The statement says:
Write a list of multiples of 7 between 98 and 266, both including
I put this code:
import java.util.*;
public class Multiples7 {
public static void main (String[] args) {
Scanner entrada;
int x;
entrada = new Scanner(System.in);
while (x >= 98 && x <= 266) {
if (x % 7 == 0){
System.out.println(x);
}
}
}
}
and I get this error that I don't understand: variable x might not have been initialized
Why x not start?