Hi
Am new to programming world and this is my first attempt.
Could some one tell me what mistake am making in this pgm?
include
int i, num[5];
int main()
{
for (i=0;i<5;i++)
{
scanf("%d",&num[i]);
}
for (i=0;i<5 && num[i]!=42;i++)
{
printf("%d\n",num[i]);
}
return 0;
}
This works fine in terminal but not a right ans in SPOJ.