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
public class Main {
public static void modulo(int[] array) {
for (int i : array) {
if (i % 5 == 4) {
System.out.print(i + " ");
}
}
}
}
Comments
Leave a comment