-
Notifications
You must be signed in to change notification settings - Fork 0
/
tests.txt
86 lines (71 loc) · 1.92 KB
/
tests.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
// Suma de enteros
int a = 10;
int b = 20;
int c = a + b;
System.out.println("The result of a + b is: ", c);
// Restando enteros
int d = 15;
int e = 5;
int f = d - e;
System.out.println("The result of d - e is: ", f);
// Concatenación de cadenas
string firstName = "John";
string lastName = "Doe";
string fullName = firstName + " " + lastName;
System.out.println("Full name: " + fullName);
// Suma de enteros con impresión directa
int num1 = 7;
int num2 = 3;
System.out.println("The sum of 7 and 3 is: ", (num1 + num2));
// Actualizando el valor de una variable int
int x = 8;
x = x + 2;
System.out.println("Updated x: ", x);
// Operación con variables int
int y = 12;
int z = 4;
int result = y / z;
System.out.println("The result of y / z is: ", result);
// Concatenando cadena con entero
string age = "25";
string message = "I am " + age + " years old.";
System.out.println(message);
// Imprimiendo el valor de una variable int
int myNumber = 100;
System.out.println("My number is: ", myNumber);
// Asignando un valor calculado
int result2 = 9 * 3 + 2;
System.out.println("The result of 9 * 3 + 2 is: ", result2);
// String con mensaje
string greeting = "Hello";
string name = "Jose";
System.out.println(greeting, ", ", name, "!");
string a = "hola";
{
string a = "jose";
System.out.println(a);
}
System.out.println(a);
System.out.println(5!=5);
int jose = 5*7;
System.out.println(jose > 45);
System.out.println(!true);
System.out.println(!false);
int goku = 5;
if(goku > 45){
System.out.println("Jose" + " Daniel");
} else if(goku == 5) {
if(goku < 10){
System.out.println("goku es igual a 5 y menor que 10");
} else {
System.out.println("goku es igual a 5 pero no menor que 10");
}
} else if(goku > 20 && goku <= 45){
System.out.println("goku está entre 20 y 45");
} else {
if(78 > 5 || (false && true)){
System.out.println(true);
} else {
System.out.println(false);
}
}