Escolar Documentos
Profissional Documentos
Cultura Documentos
Pregunta 1 9 / 9 ptos.
Pregunta 2 9 / 9 ptos.
True
False
Pregunta 3 9 / 9 ptos.
System.out.println(Arrays.toString(arreglo));
Pregunta 4 9 / 9 ptos.
Método
Matrices
Arreglo
Súper Clase
Pregunta 5 0 / 9 ptos.
int m = n * 2;
int i = n;
while (i >= 1) {
int j = 1;
while (j < m) {
if (j >= i && j <= m - i) {
if (j <= n)
System.out.print (" " + (j - i + 1) + " ");
else
System.out.print (" " + (m - j - i + 1) + " ");
} else {
System.out.print (" ");
}
j = j + 1;
}
System.out.println ();
i = i - 1;
}
1 2 3 4 5 4 3 2 1
1 2 3 4 3 2 1
1 2 3 2 1
1 2 1
1
1 1
2 2
3 3
4 4
5
4 4
3 3
2 2
1 1
1 2 3 4 5 4 3 2 1
2 2
3 3
4 4
5 5
4 4
3 3
2 2
1 2 3 4 5 4 3 2 1
1
1 2 1
1 2 3 2 1
1 2 3 4 3 2 1
1 2 3 4 5 4 3 2 1
Pregunta 6 9 / 9 ptos.
int mes = 1;
while (mes <= 12) {
dinero = dinero * 1.02;
mes++;
}
System.out.println (dinero);
Pregunta 7 9 / 9 ptos.
int m = n * 2;
int i = 1;
while (i < m) {
int j = 1;
while (j < m) {
if (i == 1 || i == m - 1) {
if (j <= n)
System.out.print (" " + j + " ");
else
System.out.print (" " + (m - j) + " ");
} else if (j == 1 || j == m - 1) {
if (i <= n)
System.out.print (" " + i + " ");
else
System.out.print (" " + (m - i) + " ");
} else {
System.out.print (" ");
} j = j + 1;
}
System.out.println ();
i = i + 1;
}
1 1
2 2
3 3
4 4
5
4 4
3 3
2 2
1 1
1 2 3 4 5 4 3 2 1
1 2 3 4 3 2 1
1 2 3 2 1
1 2 1
1
1 2 3 4 5 4 3 2 1
2 2
3 3
4 4
5 5
4 4
3 3
2 2
1 2 3 4 5 4 3 2 1
1
1 2 1
1 2 3 2 1
1 2 3 4 3 2 1
1 2 3 4 5 4 3 2 1
Pregunta 8 9 / 9 ptos.
Cuál es la librería que debo llamar para imprimir un arreglo en
pantalla ?
import java.util.Arrays;
import java.util.Scanner;
import java.util.Math;
import java.util.String;
Pregunta 9 9 / 9 ptos.
Pregunta 10 9 / 9 ptos.
False
Calificación de la evaluación: 81 de 90