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

Envío 7286

Problema 0x78 - Suma de 2 números

  • Autor: manuel claros
  • Fecha: 2024-05-14 16:18:44 UTC (Hace 7 meses)
Caso # Resultado Tiempo Memoria
#1
Error de compilación
                      Main.java:2: error: class java is public, should be declared in a file named java.java
public class java{
       ^
Main.java:7: error: cannot find symbol
suma = a+b;
^
  symbol:   variable suma
  location: class java
Main.java:9: error: cannot find symbol
System.out.print(suma);
                 ^
  symbol:   variable suma
  location: class java
3 errors

                    
#2
Error de compilación
                      Main.java:2: error: class java is public, should be declared in a file named java.java
public class java{
       ^
Main.java:7: error: cannot find symbol
suma = a+b;
^
  symbol:   variable suma
  location: class java
Main.java:9: error: cannot find symbol
System.out.print(suma);
                 ^
  symbol:   variable suma
  location: class java
3 errors

                    
#3
Error de compilación
                      Main.java:2: error: class java is public, should be declared in a file named java.java
public class java{
       ^
Main.java:7: error: cannot find symbol
suma = a+b;
^
  symbol:   variable suma
  location: class java
Main.java:9: error: cannot find symbol
System.out.print(suma);
                 ^
  symbol:   variable suma
  location: class java
3 errors

                    
#4
Error de compilación
                      Main.java:2: error: class java is public, should be declared in a file named java.java
public class java{
       ^
Main.java:7: error: cannot find symbol
suma = a+b;
^
  symbol:   variable suma
  location: class java
Main.java:9: error: cannot find symbol
System.out.print(suma);
                 ^
  symbol:   variable suma
  location: class java
3 errors

                    
#5
Error de compilación
                      Main.java:2: error: class java is public, should be declared in a file named java.java
public class java{
       ^
Main.java:7: error: cannot find symbol
suma = a+b;
^
  symbol:   variable suma
  location: class java
Main.java:9: error: cannot find symbol
System.out.print(suma);
                 ^
  symbol:   variable suma
  location: class java
3 errors

                    
Puntos totales: 0 / 100

Código

public class java{

	public static void main(String[] args) {
int a=3,b=5;
 
suma = a+b;

System.out.print(suma);
}
}