while(true) x = scanf('%d', [1]); if (x == 42) break; endif printf("%d\n", x);endwhile
1 2 88 42 10
1 2 88
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!