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

Envío 7266

Problema 0x78 - Suma de 2 números

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

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

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

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

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

                    
Puntos totales: 0 / 100

Código

public class suma{

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

System.out.print(suma);

 }
}