Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a method called logicAnd that accepts as parameters two arrays of integer (A and B) and returns another array of integer (C). C[i] =

Write a method called logicAnd that accepts as parameters two arrays of integer (A and B) and returns another array of integer (C). C[i] = 1 if B[i] divides A[i], otherwise C[i]=0. Write a test program (main) to declare and initialize two integer arrays of size entered by the user, invoke the method logicAnd, then display the array result. The program put the three arrays (A, B and C) in a 2-D array M as follow. Sample Run: Enter the size of the array: 5 Enter 5 numbers for A: 12 20 4 30 17 Enter 5 numbers for B: 3 6 24 15 9 The results: A 12 20 4 30 17

B 3 6 24 15 9

C 1 0 0 1 0

M 12 20 4 30 17

3 6 24 15 9

1 0 0 1 0

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Excel As Your Database

Authors: Paul Cornell

1st Edition

1590597516, 978-1590597514

More Books

Students also viewed these Databases questions