include <stdio.h> main() { int array[10000]; while(array[i] != 42) { printf("%d\n", array[i]) } when(array[i] = 42)break;
return 0;
} Why is it saying wrong in spoj.com. The problem heading is life, universe and everything
Where does the array get populated? You need to read the values from stdin.
And what is this keyword when? And if when was a valid statement, shouldn’t it be inside the loop?
It would be a good idea to test your code on ideone before submitting.