Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- System.out.println("items: ");
- for (int i = 0; i < a.length; i++) {
- if (sc.hasNextInt())
- a[i] = sc.nextInt();
- else {
- System.out.println("input-output error");
- sc.close();
- return;
- }
- }
- sc.close();
- switch (numurs) {
- case 1: firstMethod(a);
- break;
- case 2: secondMethod(a);
- break;
- default:
- System.out.println("input-output error");
- return;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement