Question #223858

Write a function that take an array of number as input parameters and print the member that have remember of 4 when divided by 5


Expert's answer

public class Main {

    public static void modulo(int[] array) {
        for (int i : array) {
            if (i % 5 == 4) {
                System.out.print(i + " ");
            }
        }
    }
}
LATEST TUTORIALS
APPROVED BY CLIENTS