Question: Write a script that calculates the common factors between 18 and 54. To find a common factor, you can use the modulo operator (%) to

Write a script that calculates the common factors between 18 and 54. To find a common factor, you can use the modulo operator (%) to check whether a number can be evenly divided into both numbers. Hint, test will be something like 12 % 3 = 0 and 30 % 3 = 0 , the modulo gives you the remainder,if the remainder is zero then it is a factor. ie 10 and 30 are both divisible by 3. 4 is not a common factor because it does not divide evenly into both numbers. You will need a loop to complete this easily . Murach, Chapter 14, SQL

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!