Computer Science, asked by ghoshargha94, 4 months ago

wap in java to find prime factorials of a number given by user​

Answers

Answered by legendary10
2

Answer:

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

2) After step 1, n must be odd. Now start a loop from i = 3 to square root of n.

3) 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.

Similar questions