Question: Write a function called checkFactor that takes in two numbers and checks if they are divisible, that is, if the first is divisible by the

  1. Write a function called checkFactor that takes in two numbers and checks if they are divisible, that is, if the first is divisible by the sec- ond. You may assume that both numbers are positive. You function should return a logical value , true or false.

    For example checkFactor(25,6) should return false checkFactor(9,3) should return true checkFactor(3,9) should return false

    Hint: mod(m,n) is the remainder of m n.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!