hello ...
if you know algorithmes analyzsis you can see here the BIG mistake you do ,,,
[quote]
for(j=1;j<=m[i];j++)
if((m[i]%j)==0)
count++;
[/quote]
for every m[i] you should do m[i]*m[i] process !!!
if you want to know if 100,000 is prime or no ,,, you do 10,000,000,000 process
and this isn't every thing ... you do that for all numbers between m and n .... OH MY GOD... if m=1 and n=1000
you do 1*1+2*2+3*3+4*4+.....999*999 process
you should read more about test primelity....
thank you 
good by