Why do i keep getting an overload error every time i run this?
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner read = new Scanner(System.in); int number = read.nextInt(); //your code goes here while (number >= 0 ){ if(number%3==0){ continue; } System.out.println(number--); } } } The question is : Write a program that takes N numbers as input and outputs the numbers from N to 0, skipping the ones that are multiples of 3. I dont know how else to write this or even why there is an error. From what i understand the code says: While the number is great than or equal to 0 check if the number is a multiple of "3" by dividing the number by 3 and seeing if the remainder is 0. If the remainder is not 0 leave this statement. print out on a new line number - 1. can someone explain my error?