Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- Scanner reader = new Scanner(System.in); // Reading from System.in
- System.out.println("Enter a number: ");
- int n = reader.nextInt(); // Scans the next token of the input as an int.
- //once finished
- reader.close();
- ή
- import java.util.Scanner;
- Scanner scan = new Scanner(System.in);
- String s = scan.next();
- int i = scan.nextInt();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement