package operadores;
import java.util.Scanner;
public class persona {
public static void main(String[] args) {
Scanner alfa = new Scanner(System.in);
int a[], b[], c[];
a = new int[3];
b = new int[3];
c = new int[6];
for (int i = 0; i < 3; i++) {
System.out.print((i + 1) + ". Ingrese un numero A: ");
a[i] = alfa.nextInt();
}
for (int i = 0; i < 3; i++) {
System.out.print((i + 1) + ". Ingrese un numero B: ");
b[i] = alfa.nextInt();
}
int j = 0;
for (int i = 0; i < 3; i++) {
c[j] = a[i];
j++;
c[j] = b[i];
j++;
}
System.out.print("C queda: ");
for (int i = 0; i < 6; i++) {
System.out.print(c[i] + " ");
}
System.out.println();
}
}
No hay comentarios:
Publicar un comentario