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

Envío 7113

Problema 0x78 - Suma de 2 números

  • Autor: dperezne
  • Fecha: 2023-09-20 00:55:13 UTC (Hace 8 meses)
Caso # Resultado Tiempo Memoria
#1
Error de compilación
                      Main.java:7: error: incompatible types: String cannot be converted to int
  int a = scanner.nextLine();
                          ^
1 error

                    
#2
Error de compilación
                      Main.java:7: error: incompatible types: String cannot be converted to int
  int a = scanner.nextLine();
                          ^
1 error

                    
#3
Error de compilación
                      Main.java:7: error: incompatible types: String cannot be converted to int
  int a = scanner.nextLine();
                          ^
1 error

                    
#4
Error de compilación
                      Main.java:7: error: incompatible types: String cannot be converted to int
  int a = scanner.nextLine();
                          ^
1 error

                    
#5
Error de compilación
                      Main.java:7: error: incompatible types: String cannot be converted to int
  int a = scanner.nextLine();
                          ^
1 error

                    
Puntos totales: 0 / 100

Código

import java.util.Scanner;

class Main{
 public static void Main(String[] args){
  Scanner scanner = new Scanner(System.in);
  System.out.println("Into value a:");
  int a = scanner.nextLine();
 }
}