Two prime numbers

Plz any one reply for above question. I’m very grateful for ur replies

@code_man sqrt(n) is not the complexity for sieve. It is just for a problem like this. Given a number … find all the prime factors. So you can run a loop till sqrt(n). For algorithm visit http://www.geeksforgeeks.org/print-all-prime-factors-of-a-given-number/.
Now precomputation is calculating all the prime numbers in a range say 1 to N
and not a single number. This is helpful when there are lots of queries.

Initially all the numbers is range marked true ,(assume all are prime) then All the composite number are marked false with the help of the nested loops.
You can read more about it here http://www.geeksforgeeks.org/sieve-of-eratosthenes/.
It’s a little hard to explain it completely but after reading if you get any doubt please revert back

  1. lets take number 21…
  2. 21%3=0 and 3 is a prime number…
    21%7=0 and 7 is a prime number…
    and 7*3=21…
  3. . while other numbers between 0 and
    21
    does not follow the condition.

for ex 11 is a prime number but
21%11!=0…

so only 7 and 3 are the prime numbers whose multiplication is 21.

in another case where number is 4 there is only one prime number that is 2.

in this case 2 will be multiplied by 2 and there multiplication is 4 equals to the given number.

  1. if number itself is a prime number
    than numbers are 1 and number
    itself…

                   **EXPLAINATION :** 
    

you can get it by just taking the modulus of given number from the number which are greater than 1 and less than
the given number and after operations there answer should be zero.And calculate only those number which are prime number and there multiplication equal to given number.