█████████ ████ ███░░░░░███ ░░███ ███ ░░░ ██████ ███████ ██████ ██████ ░███ ███░░███ ███░░███ ███░░███ ███░░███ ░███ ░███ ░███░███ ░███ ░███████ ░███ ░███ ░░███ ███░███ ░███░███ ░███ ░███░░░ ░███ ░███ ░░█████████ ░░██████ ░░████████░░██████ ░░██████ ░░░░░░░░░ ░░░░░░ ░░░░░░░░ ░░░░░░ ░░░░░░

Envío 7267

Problema 0x78 - Suma de 2 números

  • Autor: manuel claros
  • Fecha: 2024-05-14 15:58:04 UTC (Hace 7 meses)
Caso # Resultado Tiempo Memoria
#1
Error de compilación
                      Main.java:2: error: class, interface, or enum expected
public static void main(String[] args) {
              ^
Main.java:6: error: class, interface, or enum expected
suma = a+b;
^
Main.java:8: error: class, interface, or enum expected
System.out.print(suma);
^
Main.java:10: error: class, interface, or enum expected
 }
 ^
4 errors

                    
#2
Error de compilación
                      Main.java:2: error: class, interface, or enum expected
public static void main(String[] args) {
              ^
Main.java:6: error: class, interface, or enum expected
suma = a+b;
^
Main.java:8: error: class, interface, or enum expected
System.out.print(suma);
^
Main.java:10: error: class, interface, or enum expected
 }
 ^
4 errors

                    
#3
Error de compilación
                      Main.java:2: error: class, interface, or enum expected
public static void main(String[] args) {
              ^
Main.java:6: error: class, interface, or enum expected
suma = a+b;
^
Main.java:8: error: class, interface, or enum expected
System.out.print(suma);
^
Main.java:10: error: class, interface, or enum expected
 }
 ^
4 errors

                    
#4
Error de compilación
                      Main.java:2: error: class, interface, or enum expected
public static void main(String[] args) {
              ^
Main.java:6: error: class, interface, or enum expected
suma = a+b;
^
Main.java:8: error: class, interface, or enum expected
System.out.print(suma);
^
Main.java:10: error: class, interface, or enum expected
 }
 ^
4 errors

                    
#5
Error de compilación
                      Main.java:2: error: class, interface, or enum expected
public static void main(String[] args) {
              ^
Main.java:6: error: class, interface, or enum expected
suma = a+b;
^
Main.java:8: error: class, interface, or enum expected
System.out.print(suma);
^
Main.java:10: error: class, interface, or enum expected
 }
 ^
4 errors

                    
Puntos totales: 0 / 100

Código

public static void main(String[] args) {

int a=3,b=5;
 
suma = a+b;

System.out.print(suma);

 }