Codigo:
Código:
int num[]=new int[2];
int x;
for(x=0;x<num.length;x++){
System.out.println("ingrese un numero:"); //ingreso de los numeros al vector
num[x]=teclado.nextInt();
}
for(x=0;x<num.length;x++){ //muestra de valores
System.out.println(num[x]);
}
int x;
for(x=0;x<num.length;x++){
System.out.println("ingrese un numero:"); //ingreso de los numeros al vector
num[x]=teclado.nextInt();
}
for(x=0;x<num.length;x++){ //muestra de valores
System.out.println(num[x]);
}