Advertisement
Guest User

Untitled

a guest
Aug 21st, 2019
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. import java.util.LinkedList;
  2.  
  3. class Test{
  4. public static LinkedList<Integer> list = new LinkedList<Integer>();
  5.  
  6. public static void main(String[] args){
  7. list.add(2);
  8. list.add(3);
  9. list.add(5);
  10. list.add(8);
  11. list.add(13);
  12. list.add(21);
  13. list.add(34);
  14.  
  15. int lim = (new Scanner(System.in)).nextInt();
  16.  
  17. System.out.println(list);
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement