Computer Science, asked by Anonymous, 11 months ago

Draw a flowchart to find the H.C.F and L.C.M of two given numbers .

Answers

Answered by Anonymous
55
Let assume two numbers a,b for reading
and lets find the L.C.M &H.C.F
Hopes helps u
Mark as brainliest answer..
Attachments:
Answered by franktheruler
7

Answer:

flowchart of lcm:

start

 ↓

read n1, n2

 ↓

i=1

loop → → → → → → → → → →→ → → → →→ → → →

 ↓                                                                ↓

 ↓                                                                ↓

((i<=n1) or (i <= n2 ) →(false)  →   ↓               ↓

     ↓(true)                                ↓                 ↓

n%i = 0 and n2%i =0                ↓                ↓

         i=0                                   ↓                ↓

↓(yes)            ↓(no)                   ↓                ↓

     ↓                     ↓                   ↓                ↓

gcd←i                    ↓                   ↓                ↓

 ↓                         ↓                    ↓                ↓

         ( i← i+1 )   ← ← ← ← ← ← ← ←←                 ↓

                                                                    ↓

                       ↓← ← ← ←← ← ← ←← ← ← ←← ← ←

                        ↓

                        ↓

[put gcd of two numbers is " gcd " ]

                        ↓

                        ↓

                     end

Similar questions