[Solved] Valid or invalid barcodes [closed]
It should be more like this because you have to input n times from the user: int n = myScan.nextInt(); int[] bar = new int[n]; for (int i=0; i<bar.length; i++) { int n = myScan.nextInt(); bar[i] = n; } I consider using long instead of int in this situation. Incase you want to store each … Read more