I'm trying to make a simple program that will display 20 random numbers between 1 and 100 and then print out which numbers are divisible by 3 and equivalent to 1%3 and 2%3. It seems to work just fine but I've noticed it only works with the very last number in the list. What am I missing to include all the numbers in the search for my math? Thank you in advance for any help I can get!

```
import java.util.Random;

public class Lab5 {

public static void main(String[] args) {

    Random rnd = new Random();
    int repeat = 19;
    int n = 0;

    for(int i=0;i<=repeat;i++){
        n = rnd.nextInt(100)+1; 
        System.out.print(n+", ");

    }
    System.out.println();
    System.out.println("-------------------------------------");

    if(n % 3 == 0){
        System.out.println("Numbers divisible by three: "+n+(", "));

    }else{
        System.out.println("Numbers divisible by three: NONE");

    }
    System.out.println("-------------------------------------");
    if(n == 1 % 3){
        System.out.println("Numbers equivalent to one modulo three: "+n+(", "));

    }else{
        System.out.println("Numbers equivalent to one modulo three: NONE");
    }

    System.out.println("-------------------------------------");

    if(n == 2 % 3){
     System.out.println("Numbers equivalent to two modulo three: "+n+(", "));

    }else{
        System.out.println("Numbers equivalent to two modulo three: NONE");
    }

}

}

```