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

Envío 172

Problema 0x78 - Suma de 2 números

  • Autor: dagomez30
  • Fecha: 2020-08-30 21:51:45 UTC (Hace más de 3 años)
Caso # Resultado Tiempo Memoria
#1
Error de compilación
                      main.cpp:2:16: error: use of undeclared identifier 'atoi'
    int num1 = atoi(argv[1]), num2 = atoi(argv[2]), sum = 0;
               ^
main.cpp:2:38: error: use of undeclared identifier 'atoi'
    int num1 = atoi(argv[1]), num2 = atoi(argv[2]), sum = 0;
                                     ^
main.cpp:7:5: error: use of undeclared identifier 'cout'
    cout << sum << "\n";
    ^
3 errors generated.

                    
#2
Error de compilación
                      main.cpp:2:16: error: use of undeclared identifier 'atoi'
    int num1 = atoi(argv[1]), num2 = atoi(argv[2]), sum = 0;
               ^
main.cpp:2:38: error: use of undeclared identifier 'atoi'
    int num1 = atoi(argv[1]), num2 = atoi(argv[2]), sum = 0;
                                     ^
main.cpp:7:5: error: use of undeclared identifier 'cout'
    cout << sum << "\n";
    ^
3 errors generated.

                    
#3
Error de compilación
                      main.cpp:2:16: error: use of undeclared identifier 'atoi'
    int num1 = atoi(argv[1]), num2 = atoi(argv[2]), sum = 0;
               ^
main.cpp:2:38: error: use of undeclared identifier 'atoi'
    int num1 = atoi(argv[1]), num2 = atoi(argv[2]), sum = 0;
                                     ^
main.cpp:7:5: error: use of undeclared identifier 'cout'
    cout << sum << "\n";
    ^
3 errors generated.

                    
#4
Error de compilación
                      main.cpp:2:16: error: use of undeclared identifier 'atoi'
    int num1 = atoi(argv[1]), num2 = atoi(argv[2]), sum = 0;
               ^
main.cpp:2:38: error: use of undeclared identifier 'atoi'
    int num1 = atoi(argv[1]), num2 = atoi(argv[2]), sum = 0;
                                     ^
main.cpp:7:5: error: use of undeclared identifier 'cout'
    cout << sum << "\n";
    ^
3 errors generated.

                    
#5
Error de compilación
                      main.cpp:2:16: error: use of undeclared identifier 'atoi'
    int num1 = atoi(argv[1]), num2 = atoi(argv[2]), sum = 0;
               ^
main.cpp:2:38: error: use of undeclared identifier 'atoi'
    int num1 = atoi(argv[1]), num2 = atoi(argv[2]), sum = 0;
                                     ^
main.cpp:7:5: error: use of undeclared identifier 'cout'
    cout << sum << "\n";
    ^
3 errors generated.

                    
Puntos totales: 0 / 100

Código

int main(int argc, char* argv[]) {
    int num1 = atoi(argv[1]), num2 = atoi(argv[2]), sum = 0;

    (void)argc;
    sum = num1 + num2;

    cout << sum << "\n";
    return 0;
}