+91-85006-22255
Write a program to find modulus every array element with 7.
{2, 14, 8, 42, 15}
{2, 0, 1, 0, 1}
{21, 34, 3, 8, 16}
{0, 6, 3, 1, 2}
class ModulesEveryArrayElement { public static void main(String s[]) { int[] input = { 3, 15, 16, 7 }; int[] output = getModulusOfEveryArrayElement(input); System.out.print("Modulus of every element is : "); for(int element : output) { System.out.print(element + ", "); } } public static int[] getModulusOfEveryArrayElement(int[] input) { int[] result = null;
return result; } }
Topic: Learn Arrays And Loops
Read this topic Take test on this topic
Open In App