Beruflich Dokumente
Kultur Dokumente
1. Ingrese a eclipse.
2. Cree un proyecto.
3. Cree una clase.
4. Realize el encabezado public static void main (String[] args){
5. Declare variables ( DE SER NECESARIO)
int a = 1;
int b = 2;
int c = 5;
int d = (a + b) * c;
int e = a + b * c;
int f = 2 * a * a * + b * 3 + c;
System.out.println (a);
System.out.println (b);
System.out.println (c);
System.out.println (d);
System.out.println (e);
System.out.println (f);
15
10
17
2
5
15
12
17
15
11
17
15
11
17
1. Ingrese a eclipse.
2. Cree un proyecto.
3. Cree una clase.
4. Realize el encabezado public static void main (String[] args){
5. Declare variables ( DE SER NECESARIO)
int n=2;
for(int i = 1; i<=10; i++){
System.out.println(n + " * " + i + " = " + n*i);
}
1*1=1
2*2=4
3*3=9
4 * 4 = 16
5 * 5 = 25
6 * 6 = 36
7 * 7 = 49
8 * 8 = 64
9 * 9 = 81
10 * 10 = 100
4*1=4
4*2=8
4 * 3 = 12
4 * 4 = 16
4 * 5 = 20
4 * 6 = 24
4 * 7 = 28
4 * 8 = 32
4 * 9 = 36
4 * 10 = 40
6*1=6
6 * 2 = 12
6 * 3 = 18
6 * 4 = 24
6 * 5 = 30
6 * 6 = 36
6 * 7 = 42
6 * 8 = 48
6 * 9 = 54
6 * 10 = 60
2*1=2
2*2=4
2*3=6
2*4=8
2 * 5 = 10
2 * 6 = 12
2 * 7 = 14
2 * 8 = 16
2 * 9 = 18
2 * 10 = 20
1. Ingrese a eclipse.
2. Cree un proyecto.
3. Cree una clase.
4. Realize el encabezado public static void main (String[] args){
5. Declare variables ( DE SER NECESARIO)
El programa genera una cadena compuesta de K y J. Donde J representa los dígitos impares
de un número de 3 cifras y O representa los dígitos pares.
String a = "hola";
boolean e = !c;
char f = 'f';
char g = 'f';
boolean h = g != f;
System.out.println (a);
System.out.println (b);
System.out.println (c);
System.out.println (e);
System.out.println (f);
System.out.println (g);
System.out.println (h );
hola_
hola
false
false
false
hola
hola
true
false
false
hola
hola
false
false
f
false
hola
hola_
false
true
false
Garantizar que las condiciones coincidan con los bloques de instrucciones asignados para
cada caso
1. Ingrese a eclipse.
2. Cree un proyecto.
3. Cree una clase.
4. Realize el encabezado public static void main (String[] args){
5. Declare variables ( DE SER NECESARIO)
r+=x/10000;
x=x%10000;
r+=x/1000;
x=x%1000;
r+=x/100;
x=x%100;
r+=x/10;
r+=x%10;
System.out.println(x);
50
90
180
130
1. Ingrese a eclipse.
2. Cree un proyecto.
3. Cree una clase.
4. Realize el encabezado public static void main (String[] args){
5. Declare variables ( DE SER NECESARIO)
x = i / 2;
y *= 2;
z = y / 3.0;
i++;
j += k + 5;
j += k + 2;
k--;
System.out.println (x);
System.out.println (y );
System.out.println (z);
System.out.println (i);
System.out.println (j);
System.out.println (k);
3.0
11.0
1.0
-2
1.0
9.0
1.0
-1
1.0
29.8
9.933333333333334
11
0.0
9.0
3.0
-1
String a = "hola";
boolean e = !c;
char f = 'f';
char g = 'f';
boolean h = g != f;
System.out.println (a);
System.out.println (b);
System.out.println (c);
System.out.println (e);
System.out.println (f);
System.out.println (g);
System.out.println (h );
hola_
hola
false
false
false
hola
hola_
false
true
false
hola
hola
true
false
false
hola
hola
false
false
false
char i = 'd';
char j = 'e';
int n = 2;
String s = "d+e";
String t = "de";
System.out.println (i);
System.out.println (j);
System.out.println (s);
System.out.println (t);
System.out.println (u);
de
de
d2!
e
d+e
de!
de
de
de
de!
d+e
de
d2e!
import java.util.Screen;
import java.Scanner;
import java.util.Scanner;
import java.util.Math;
True
False
1. Ingrese a eclipse.
2. Cree un proyecto.
3. Cree una clase.
4. Realize el encabezado public static void main (String[] args){
5. Declare variables ( DE SER NECESARIO)
30
200
109
308
500
1. Ingrese a eclipse.
2. Cree un proyecto.
3. Cree una clase.
4. Realize el encabezado public static void main (String[] args){
5. Declare variables ( DE SER NECESARIO)
Suponga la siguiente porción de código donde existe una variable numero definida previamente. Evalúe la
ejecución con valores 3, 12, 18, 20, 22.
int resultado = 0;
if (numero % 2 == 0) {
if (numero % 4 == 0) {
if (numero % 6 == 0)
resultado = 3;
else
resultado = 2;
else {
resultado = 1;
else {
resultado = 0;
boolean a = false;
boolean b = true;
boolean c = !a;
boolean d = a || b;
System.out.println (a);
System.out.println (b);
System.out.println (c);
System.out.println (d);
System.out.println (e);
System.out.println (f);
true
true
true
false
false
false
true
false
true
true
false
false
true
true
true
true
true
false
true
true
true
true
false
int a = 1;
int b = 2;
int c = 5;
int d = (a + b) * c;
int e = a + b * c;
int f = 2 * a * a * + b * 3 + c;
System.out.println (a);
System.out.println (b);
System.out.println (c);
System.out.println (d);
System.out.println (e);
System.out.println (f);
15
11
17
15
12
17
1
15
10
17
15
11
17
1. Ingrese a eclipse.
2. Cree un proyecto.
3. Cree una clase.
4. Realize el encabezado public static void main (String[] args){
5. Declare variables ( DE SER NECESARIO)
int x=700;
String cadena = "";
if ((x / 100) % 2 == 0){
cadena = "O" + cadena;}
else {
cadena = "X" + cadena;}
if ((x % 100 / 10) % 2 == 0){
cadena = cadena + "O";}
else {
cadena = cadena + "X";}
if ((x % 100 % 10 / 1) % 2 == 0){
cadena = cadena + "O";}
else {
cadena = cadena + "X";}
System.out.println(cadena);
El programa genera una cadena compuesta de K y J. Donde J representa los dígitos impares
de un número de 3 cifras y O representa los dígitos pares.
1. Ingrese a eclipse.
2. Cree un proyecto.
3. Cree una clase.
4. Realize el encabezado public static void main (String[] args){
5. Declare variables ( DE SER NECESARIO)
char i = 'd';
char j = 'e';
int n = 2;
String s = "d+e";
String t = "de";
System.out.println (i);
System.out.println (j);
System.out.println (s);
System.out.println (t);
System.out.println (u);
de
de
d2!
de
de
de!
d+e
de!
de
d
d+e
de
d2e!
1. Ingrese a eclipse.
2. Cree un proyecto.
3. Cree una clase.
4. Realize el encabezado public static void main (String[] args){
5. Declare variables ( DE SER NECESARIO)
char i = 'd';
char j = 'e';
int n = 2;
String s = "d+e";
String t = "de";
System.out.println (i);
System.out.println (j);
System.out.println (s);
System.out.println (t);
System.out.println (u);
d+e
de!
de
de
de
d2!
d
e
de
de
de!
d+e
de
d2e!
1. Ingrese a eclipse.
2. Cree un proyecto.
3. Cree una clase.
4. Realize el encabezado public static void main (String[] args){
5. Declare variables ( DE SER NECESARIO)
int x=26750,r=0;
r+=x/10000;
x=x%10000;
r+=x/1000;
x=x%1000;
/*
r+=x/100;
x=x%100;
*/
r+=x/10;
r+=x%10;
System.out.println(r);
23
33
83 (83..83)
Evaluación guardada en 21:34 Entregar evaluación
Preguntas
No han respondido todavíaPregunta 1
No han respondido todavíaPregunta 2
No han respondido todavíaPregunta 3
No han respondido todavíaPregunta 4
No han respondido todavíaPregunta 5
No han respondido todavíaPregunta 6
No han respondido todavíaPregunta 7
No han respondido todavíaPregunta 8
No han respondido todavíaPregunta 9
No han respondido todavíaPregunta 10
No han respondido todavíaPregunta 11
No han respondido todavíaPregunta 12
No han respondido todavíaPregunta 13
No han respondido todavíaPregunta 14
No han respondido todavíaPregunta 15
No han respondido todavíaPregunta 16
No han respondido todavíaPregunta 17
No han respondido todavíaPregunta 18
No han respondido todavíaPregunta 19
No han respondido todavíaPregunta 20