Advertisement
devankransteuber

Untitled

Mar 6th, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 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=0;i<numList.length;i++){
  35.  
  36. for(i=0;i<numList.length;i++){
  37. System.out.println(numList[i]);
  38. }
  39.  
  40. }
  41.  
  42. }
  43.  
  44.  
  45.  
  46. }
  47.  
  48.  
  49. /*
  50. use scanner to get inputs
  51. create a new array based on the now known length
  52. put each integer into the array with place of [i]
  53.  
  54. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement