Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Are two numbers divisible? Write a function called checkFactor that takes two arrays of positive numbers, firstNumberRow and secondNumberRow, and checks if the first entry

image text in transcribed

Are two numbers divisible? Write a function called checkFactor that takes two arrays of positive numbers, firstNumberRow and secondNumberRow, and checks if the first entry in firstNumberRow is divisible by the first entry in secondNumberRow, and performs the same operation on the next array elements, untill all entries have been checked. You may assume that all the numbers are positive and the number of entries in the arrays is the same. The function should return the identified divisible numbers in two row arrays firstDivisible and secondDivisible. Restriction: You may not use branches or loops. For example, if firstNumberRowa(5, 7, 8, 8, 31: secondNumberRow = [7, 7, 2, 2, 51: IfirstDivisible, secondDivisiblel-checkFactor(firstNumberRow, secondNumberRow) produces: firstDiv isible = 8 secondDivisible = Indicating that the second entries (the two 7s), the third entries (the 8 and the 2), and finally the fourt entries (the 8 and 2) are divisible positive integers. Your Function Save C Reset MATLAB Documentation 1 function [firstDivisible, secondDivisiblel-checkFactor (firstNumberRow, secondNumberRow) 4 end

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

Pro SQL Server Wait Statistics

Authors: Enrico Van De Laar

1st Edition

1484211391, 9781484211397

More Books

Students also viewed these Databases questions

Question

Why is the System Build Process an iterative process?

Answered: 1 week ago