Computer Science, asked by astuyd1072, 7 months ago

Draw a flowchart to find LCM of two numbers

Answers

Answered by amitdagar0550
7

Answer:

let suppose we have two no. 20 and 30. firstly by division method we find his factor. factor of 20 is 2×5×2.and factor of 30 is 3×5×3.now in both digit 5 is common then it is hcf. and to find lcm we take hcf digits 5 and 2 and 2 and 3 and 3. now final step multiple the all digit we take in Upper line 5×2×2×3×3=180 and lcm is 180

Answered by pruthaasl
3

Answer:

The algorithm to find the LCM of two numbers is as follows:

Step 1: Start the program

Step 2: Take the two numbers as input and store them.

Step 3: Compare the two numbers to find the largest and set it as the maximum.

Step 4: Logically AND the outputs of the maximum mod first number and maximum mod second number.

Step 5: If the result is false, increment the value of the maximum by one and go to step 4.

Step 6: Assign the maximum value as the LCM.

Step 7: End the program.

The flowchart to find the LCM of two numbers is as follows:

#SPJ2

Attachments:
Similar questions