can you identify and correct it ?
It’ s prime fact using sieve
can you identify and correct it ?
It’ s prime fact using sieve
@premang corrected your code for producing prime factors less than n
dont forget to mark it as resolved and hit like if cleared 
i dont understand this part
int i=1;
//int prime=p[0];
while(i*i<=n) {
//factors.push_back(prime);
if(p[i]==1 && n%i==0) {
factors.push_back(i);
}
i++;
}
why we are not starting from p[0] ?
what the meaning of this (p[i]==1 && n%i==0) ?
@premang hey the prime sieve you built denotes if ith value is prime or not so i am iterating on factors of n and if prime[i] = 1 means if the factor is prime and it is factor(n%i==0) push it and continue
i dont understand ur logic,
we made array p which is having all prime numbers.
then we should check the condition (primeprime <= number)
then why are you doing (ii<=number), i is index which is starting from 1.
1*1 is always <= number
just tell me why we are starting from i=1 ?
@premang you want factors right thats why also your prime array contains 1 or 0 only denoting ele present or not
just dry run it for n=12
i the code you edited , i entered n=10
no output why ?
got it
thankssssssssssssssssssss 
i already marked as solved