Advertisement
Guest User

Untitled

a guest
Sep 26th, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1.  
  2. import javax.swing.*;
  3.  
  4. public class Arreglos {
  5. public static void main(String[] args) {
  6. String[] a = new String[10];
  7.  
  8.  
  9.  
  10. JOptionPane.showMessageDialog(null,"Escribir 10 números enteros: ");
  11. for (int i = 0; i < a.length; i++) {
  12.  
  13. a[i]=JOptionPane.showInputDialog("Introducir # " + (i+1) + ": ");
  14. }
  15.  
  16. for (int i = 0; i < a.length; i++) {
  17.  
  18. JOptionPane.showMessageDialog(null,"Los numeros son:" +a[i] );
  19.  
  20.  
  21.  
  22. }
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement