Advertisement
devankransteuber

Untitled

Mar 6th, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. import java.util.ArrayList;
  2. import java.util.Scanner;
  3.  
  4.  
  5. public class DailyProgrammerOblique {
  6.  
  7.  
  8. private static int i;
  9.  
  10.  
  11. public static void main(String args[]){
  12.  
  13.  
  14. Scanner scanner = new Scanner(System.in);
  15.  
  16.  
  17.  
  18.  
  19. ArrayList<Integer> intList = new ArrayList<Integer>();
  20.  
  21.  
  22.  
  23. while(scanner.hasNextInt()){
  24. int number = scanner.nextInt();
  25. intList.add(number);
  26.  
  27. }
  28.  
  29. int[] numList = new int[intList.size()];
  30. for(i=0; i<intList.size(); i++){
  31. numList[i] = intList.get(i);
  32. }
  33.  
  34. for(i=1;i<5;i++){
  35.  
  36. for(i=0;i<numList.length;i++){
  37.  
  38. for(i=0;i<numList.length;i++){
  39. System.out.println(numList[i]);
  40. }
  41. }
  42.  
  43. }
  44.  
  45. }
  46.  
  47.  
  48.  
  49. }
  50.  
  51.  
  52. /*
  53. use scanner to get inputs
  54. create a new array based on the now known length
  55. put each integer into the array with place of [i]
  56.  
  57. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement