Write a program to count no. of elements in an array that are atleast divisible by 1 element of the array
Answers
Answered by
0
Elements of an array that are not divisible by any element of another array
Given two arrays A[] and B[], write an efficient code to determine if every element of B[] is divisible by at least 1 element of A[]. Display those elements of B[], which are not divisible by any of the element in A[].
Examples:
Input : A[] = {100, 200, 400, 100, 600} B[] = {45, 90, 48, 1000, 3000} Output : 45, 90, 48 The output elements are those that are not divisible by any element of A[].
Given two arrays A[] and B[], write an efficient code to determine if every element of B[] is divisible by at least 1 element of A[]. Display those elements of B[], which are not divisible by any of the element in A[].
Examples:
Input : A[] = {100, 200, 400, 100, 600} B[] = {45, 90, 48, 1000, 3000} Output : 45, 90, 48 The output elements are those that are not divisible by any element of A[].
Similar questions