-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJava_2
More file actions
32 lines (18 loc) · 773 Bytes
/
Java_2
File metadata and controls
32 lines (18 loc) · 773 Bytes
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
package javaapplication4;
public class JavaApplication4 {
public static void main(String[] args) {
int N1= 2300, N2=1020, N3=1500;
if (N1 > N2 && N1 > N3)
{System.out.println("N1 con valor de "+N1+" es mayor que "+N2+" y que "+N3+".");
}
if (N2 > N1 && N2 > N3)
{System.out.println("N2 con valor de "+N2+" es mayor que "+N3+" y que "+N1+".");
}
if (N3 > N1 && N3 > N2)
{System.out.println("N3 con valor de "+N3+" es mayor que "+N2+" y que "+N1+".");
} //Si todos son iguales, evalúo así.
if ((N1 == N2) && (N2 == N3) && (N3 == N1))
{System.out.println("Son todos iguales");
}
}
}