Answer to Question #223858 in Java | JSP | JSF for Viru

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


1
Expert's answer
2021-08-06T07:32:31-0400
public class Main {

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

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS