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

2 answers

ascascasc
READ a,b;
a>=n
C=a%b
If c=0
DISPLAY n is the GCD;
If c is not equal to 0
REPLACE a with b and b with the c and go to c=a%b
Similar Questions
  1. Purpose:• Write AND OR & NOT logic in pseudo-code and Raptor. Requirements: In Notepad, write pseudo-code for the following.
    1. answers icon 9 answers
  2. Purpose:• Write AND OR & NOT logic in pseudo-code and Raptor. Requirements: In Notepad, write pseudo-code for the following.
    1. answers icon 1 answer
    1. answers icon 0 answers
  3. Week 3 - Expand Pseudo CodeThe accounting office indicated the code must be able to handle overtime hours. Add functionality to
    1. answers icon 0 answers
more similar questions