https://ide.codingblocks.com/s/52779
https://hack.codingblocks.com/contests/c/512/815
plz check my code.i m not getting any output.plz also check if my code is correct or not. i commented the steps
https://ide.codingblocks.com/s/52779
https://hack.codingblocks.com/contests/c/512/815
plz check my code.i m not getting any output.plz also check if my code is correct or not. i commented the steps
you doing is having a run time error.
in line 30 change a[k]>0 to a[k]> 1 you code will go infinite in case of 0
in line 31 condition will be allprime[i]<=a[k]
there are still more errors try to debug the code.
If(still doubt)
post_doubt()
else
hit_like 
Cheers!
TIP
also you could have optimised code more, rather than calculating prime for each test case, calculate only one time and then just use in every test case.
Cheers!
it is still giving wrong answers for many cases.whats my mistake?
https://ide.codingblocks.com/s/52810