Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- class select
- {
- public static void main(String args[])
- {
- Scanner reader = new Scanner(System.in);
- while (true) {
- System.out.println("Type numbers");
- int a = Integer.parseInt(reader.nextLine());
- if (a == -1) {
- System.out.println("Thank you!");
- break;
- }
- else {
- a = Integer.parseInt(reader.nextLine());
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment