Skip to content

Instantly share code, notes, and snippets.

@steve0hh
Created October 20, 2017 16:29
Show Gist options
  • Save steve0hh/8823cb6bdf2f05a0e33980f604351ec4 to your computer and use it in GitHub Desktop.
Save steve0hh/8823cb6bdf2f05a0e33980f604351ec4 to your computer and use it in GitHub Desktop.
import java.util.*;
import java.io.*;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
while(in.hasNext()){
int input = in.nextInt();
if(input == 42){ break;}
System.out.println(input);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment