WRONG ANSWER

#include<stdio.h>
int main()
{
int a[10],i,t;
int count=0;
for(i=0;i<5;i++)
scanf("%d",&a[i]);
for(i=0;i<5;i++)
{
if(a[i]>=1 && a[i]<100)
count++;
else
return 0;
}
if(count==5)
{
for(i=0;i<5;i++)
{
if(a[i]==42)
{
for(t=0;t<i;t++)
printf("%d\n",a[t]);
}
}
}
else
return 0;
return 0;
}

plz help me i am getting wrong answer on codechef compiler while i m getting correct output on my system. I m unable to fix the bug.Need help Problem:: Life and the universe

bro you have to take input such that if it encounter 42.you have to stop taking more inputs … and you are taking input for 5 numbers only …
otherwise you can look at my solution …http://www.codechef.com/viewsolution/2498498

//