Error shown while submitting program

when i run the given code on my pc it gave the true answer

#include<stdio.h>
void main()
{
int num;
while(num!=42)
{
scanf("%d",&num);
if(num!=42)
printf("%d",num);
}
}

but when i submit it on this site its shows runtime error

C programs should have return 0 at the time of exiting from main otherwise codechef throws a Run Time Error (NZEC)

2 Likes