Advertisement
Montoya-Romina-Anahi

Tp4_Punto5_main

Jun 19th, 2020
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. import java.util.Random;
  4.  
  5.  
  6. public class main {
  7.  
  8. public static void main(String[] args) {
  9.  
  10. int elemento;
  11.  
  12. Random r =new Random();
  13.  
  14. Scanner S= new Scanner(System.in);
  15.  
  16. listaSimple L = new listaSimple();
  17.  
  18. System.out.println("Ingrese la cantidad de elementos : ");
  19.  
  20. elemento=S.nextInt();
  21.  
  22. for (int i=0;i<elemento;++i) {
  23.  
  24. L.ingresarNodo(r.nextInt(30));
  25.  
  26. }
  27.  
  28. System.out.println("Lista original");
  29.  
  30. L.verLista();
  31.  
  32. System.out.println("Lista multiplo 2 y 5 a la vez");
  33.  
  34. L.verListamultiple();
  35.  
  36. }
  37.  
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement