Asked by ravindu
how can write a pseudo code and a flow charts to solve these?
1 to find the greatest common divisor out of two positive integers.
2 to find the smallest common factor out of two positive intrgers.
Write the flow of thinking just as you do it in your head. Work through a sample problem on paper, then model your process as a flow chargt.
Note that you can define the greatest common divisor function recursively:
GCD[x,y] = GCD[y Mod x,x]
And GCD[0,x] = x
1 to find the greatest common divisor out of two positive integers.
2 to find the smallest common factor out of two positive intrgers.
Write the flow of thinking just as you do it in your head. Work through a sample problem on paper, then model your process as a flow chargt.
Note that you can define the greatest common divisor function recursively:
GCD[x,y] = GCD[y Mod x,x]
And GCD[0,x] = x
Answers
Submit Your Answer
We prioritize human answers over AI answers.
If you are human, and you can answer this question, please submit your answer.