Advertisement
djemm1996

Untitled

Feb 25th, 2017
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. System.out.println("items: ");
  2.  
  3. for (int i = 0; i < a.length; i++) {
  4.  
  5. if (sc.hasNextInt())
  6. a[i] = sc.nextInt();
  7.  
  8. else {
  9. System.out.println("input-output error");
  10. sc.close();
  11. return;
  12. }
  13. }
  14. sc.close();
  15.  
  16. switch (numurs) {
  17.  
  18. case 1: firstMethod(a);
  19. break;
  20. case 2: secondMethod(a);
  21. break;
  22.  
  23. default:
  24. System.out.println("input-output error");
  25. return;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement