Computer Science, asked by rajaaliyaan914, 2 months ago

Draw flowchart of input numbers n1 n2 . Determine whether n1 divides n2 or not

Answers

Answered by shivkumaraa1980
2

Answer:

khgfsa +-₹#hufxfhhf+-₹#@jutdjj

Answered by manalikaraj2007
1

Answer:

While n is divisible by 2, print 2 and divide n by 2.

After step 1, n must be odd. Now start a loop from i = 3 to square root of n. While i divides n, print i and divide n by i, increment i by 2 and continue.

If n is a prime number and is greater than 2, then n will not become 1 by above two steps. So print n if it is greater than 2.

Step one requires a loop to print out all the times 2 is a factor of the number.

Step two requires an outer loop and a nested loop to identify all the odd factors less than the square root of the number.

Step three is needed if the input number is itself a prime number greater than 2.

A flowchart for this algorithm can be written as:

please subscribe me on brainly and mark my answer as brainliest answer thank you

Similar questions