Mersenne Prime

I was doing challenges on codeeval.com,and this code runs perfectly on devc++
but when I submitted this code on site they show me error in results
OUTPUT
..
any help? .

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
  #include<stdio.h>
int main()
{
int num,i=1,c,count,z;
scanf("%d",&num);

while(i<num)
{
count=0;
for(c=1;c<=i;c++)
{
if(i%c==0) 
count++;
}
if(count==2)  
{
	z=i+1; 
	
	while(z!=1 && z%2==0)
	{
		z=z/2;
		
	}
	if(z==1)
	printf("%d, ",i);
}
i++;
}
printf("\b\b ");
}
works fine on cpp.sh, could you give us the link of online IDE they use?
Is this the challenge? https://www.codeeval.com/browse/240/

It says the first (command line) argument is a file path to a file that contains the test case numbers. You should use these numbers instead of reading a number from stdin using scanf like you do now. It is not clear how you should separate the output for each test case but a fair assumption is that they want you to use one line for each test case.
peter87 its the same challenge. can you correct my code used?

programmer007 they use C 4.8.4
i use C 4.8.2 it works perfect in it.
Topic archived. No new replies allowed.