User talk:Yoosofan: Difference between revisions
m
the page appears among the C tasks
(Why I remove my changes) |
m (the page appears among the C tasks) |
||
(2 intermediate revisions by one other user not shown) | |||
Line 1:
My code for [[Almost prime|k-Almost-prime]] was more clear but less efficient, so I remove it. Here is my code
==C==
<lang c>int kprime(int n,int k){
int p=2;
while(p<=n)
if(n%p==0)
{n/=p;k--;}
else p++;
return !k;
}
|