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

Envío 4088

Problema 0x78 - Suma de 2 números

  • Autor: TacoMeister
  • Fecha: 2021-05-11 00:38:00 UTC (Hace más de 3 años)
Caso # Resultado Tiempo Memoria
#1
Error de compilación
                      Main.java:2: error: class Suma is public, should be declared in a file named Suma.java
public class Suma {
       ^
1 error

                    
#2
Error de compilación
                      Main.java:2: error: class Suma is public, should be declared in a file named Suma.java
public class Suma {
       ^
1 error

                    
#3
Error de compilación
                      Main.java:2: error: class Suma is public, should be declared in a file named Suma.java
public class Suma {
       ^
1 error

                    
#4
Error de compilación
                      Main.java:2: error: class Suma is public, should be declared in a file named Suma.java
public class Suma {
       ^
1 error

                    
#5
Error de compilación
                      Main.java:2: error: class Suma is public, should be declared in a file named Suma.java
public class Suma {
       ^
1 error

                    
Puntos totales: 0 / 100

Código

import java.util.Scanner;
public class Suma {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n1 = scanner.nextInt();
        int n2 = scanner.nextInt();
        System.out.println(n1 + n2);
    }
}