Computer Science, asked by ghoshargha94, 3 months ago

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

Answers

Answered by Anonymous
2

Answer:

Following are the steps to find all prime factors.

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.

Answered by Anonymous
2

Explanation:

Following are the steps to find all prime factors.

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.

hope you appreciate this ans

Similar questions
Math, 1 month ago