Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started