fork download
  1. import java.io.BufferedReader;
  2. import java.io.IOException;
  3. import java.io.InputStreamReader;
  4.  
  5. public class Main {
  6. public static void main(String[] args) throws IOException {
  7. int n;
  8. while ((n = Integer.parseInt(br.readLine())) != 42) {
  9. System.out.println(n);
  10. }
  11. }
  12. }
Success #stdin #stdout 0.04s 4386816KB
stdin
1
2
88
42
99
stdout
1
2
88