Los primeros 3.
1.-
class suma {
public static void main
(String [] args
) {
int n2=30, n3 = 60, n1 = 50, suma;
suma = n1 + n2;
System.
out.
println("LA SUMA ES:" + suma
); suma = suma + n3;
}
}
2.-
class suma
{
public static void main
(String [] args
) {
int n1 = 50, n2 = 30, suma;
suma = n1 + n2;
System.
out.
println("LA SUMA ES:" + suma
); }
}
3.-
class cuadrado
{
public static void main
(String [] args
) {
int numero = 2, cuad;
cuad = numero * numero;
System.
out.
println("EL CUADRADO DE " + numero
+ " ES:" + cuad
); }
}