Question: Use Standard ML code (SML) 1.Write a function Factors that for a given natural number N , and numbers low and high , returns a

Use Standard ML code (SML)

1.Write a function Factors that for a given natural number N , and numbers low and high , returns a list of the numbers between

low and high (both included) that divide N.

2. Write a function CoPrimethat for two given natural numbers p and q returns true if p and q are co-prime (have no factors in common except 1).

Example inputs and outputs:

Factors (24 ,3 ,9);

v a l i t = [ 3 , 4 , 6 , 8 ] : i n t l i s t

CoPrime (24 ,25);

v a l i t = true : bool

CoPrime (22 ,33);

v a l i t = f a l s e : bool

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!