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

Envío 5046

Problema 0x78 - Suma de 2 números

  • Autor: Sergio.Urrego
  • Fecha: 2021-10-08 04:07:20 UTC (Hace alrededor de 3 años)
Caso # Resultado Tiempo Memoria
#1
Error de compilación
                      main.c:1:7: error: expected parameter declarator
scanf("%d %d", &a, &b);
      ^
main.c:1:7: error: expected ')'
main.c:1:6: note: to match this '('
scanf("%d %d", &a, &b);
     ^
main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
scanf("%d %d", &a, &b);
^
main.c:1:1: warning: incompatible redeclaration of library function 'scanf' [-Wincompatible-library-redeclaration]
main.c:1:1: note: 'scanf' is a builtin with type 'int (const char *restrict, ...)'
main.c:2:8: error: expected parameter declarator
printf("%d\n", a + b);
       ^
main.c:2:8: error: expected ')'
main.c:2:7: note: to match this '('
printf("%d\n", a + b);
      ^
main.c:2:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
printf("%d\n", a + b);
^
main.c:2:1: warning: incompatible redeclaration of library function 'printf' [-Wincompatible-library-redeclaration]
main.c:2:1: note: 'printf' is a builtin with type 'int (const char *, ...)'
4 warnings and 4 errors generated.

                    
#2
Error de compilación
                      main.c:1:7: error: expected parameter declarator
scanf("%d %d", &a, &b);
      ^
main.c:1:7: error: expected ')'
main.c:1:6: note: to match this '('
scanf("%d %d", &a, &b);
     ^
main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
scanf("%d %d", &a, &b);
^
main.c:1:1: warning: incompatible redeclaration of library function 'scanf' [-Wincompatible-library-redeclaration]
main.c:1:1: note: 'scanf' is a builtin with type 'int (const char *restrict, ...)'
main.c:2:8: error: expected parameter declarator
printf("%d\n", a + b);
       ^
main.c:2:8: error: expected ')'
main.c:2:7: note: to match this '('
printf("%d\n", a + b);
      ^
main.c:2:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
printf("%d\n", a + b);
^
main.c:2:1: warning: incompatible redeclaration of library function 'printf' [-Wincompatible-library-redeclaration]
main.c:2:1: note: 'printf' is a builtin with type 'int (const char *, ...)'
4 warnings and 4 errors generated.

                    
#3
Error de compilación
                      main.c:1:7: error: expected parameter declarator
scanf("%d %d", &a, &b);
      ^
main.c:1:7: error: expected ')'
main.c:1:6: note: to match this '('
scanf("%d %d", &a, &b);
     ^
main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
scanf("%d %d", &a, &b);
^
main.c:1:1: warning: incompatible redeclaration of library function 'scanf' [-Wincompatible-library-redeclaration]
main.c:1:1: note: 'scanf' is a builtin with type 'int (const char *restrict, ...)'
main.c:2:8: error: expected parameter declarator
printf("%d\n", a + b);
       ^
main.c:2:8: error: expected ')'
main.c:2:7: note: to match this '('
printf("%d\n", a + b);
      ^
main.c:2:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
printf("%d\n", a + b);
^
main.c:2:1: warning: incompatible redeclaration of library function 'printf' [-Wincompatible-library-redeclaration]
main.c:2:1: note: 'printf' is a builtin with type 'int (const char *, ...)'
4 warnings and 4 errors generated.

                    
#4
Error de compilación
                      main.c:1:7: error: expected parameter declarator
scanf("%d %d", &a, &b);
      ^
main.c:1:7: error: expected ')'
main.c:1:6: note: to match this '('
scanf("%d %d", &a, &b);
     ^
main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
scanf("%d %d", &a, &b);
^
main.c:1:1: warning: incompatible redeclaration of library function 'scanf' [-Wincompatible-library-redeclaration]
main.c:1:1: note: 'scanf' is a builtin with type 'int (const char *restrict, ...)'
main.c:2:8: error: expected parameter declarator
printf("%d\n", a + b);
       ^
main.c:2:8: error: expected ')'
main.c:2:7: note: to match this '('
printf("%d\n", a + b);
      ^
main.c:2:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
printf("%d\n", a + b);
^
main.c:2:1: warning: incompatible redeclaration of library function 'printf' [-Wincompatible-library-redeclaration]
main.c:2:1: note: 'printf' is a builtin with type 'int (const char *, ...)'
4 warnings and 4 errors generated.

                    
#5
Error de compilación
                      main.c:1:7: error: expected parameter declarator
scanf("%d %d", &a, &b);
      ^
main.c:1:7: error: expected ')'
main.c:1:6: note: to match this '('
scanf("%d %d", &a, &b);
     ^
main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
scanf("%d %d", &a, &b);
^
main.c:1:1: warning: incompatible redeclaration of library function 'scanf' [-Wincompatible-library-redeclaration]
main.c:1:1: note: 'scanf' is a builtin with type 'int (const char *restrict, ...)'
main.c:2:8: error: expected parameter declarator
printf("%d\n", a + b);
       ^
main.c:2:8: error: expected ')'
main.c:2:7: note: to match this '('
printf("%d\n", a + b);
      ^
main.c:2:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
printf("%d\n", a + b);
^
main.c:2:1: warning: incompatible redeclaration of library function 'printf' [-Wincompatible-library-redeclaration]
main.c:2:1: note: 'printf' is a builtin with type 'int (const char *, ...)'
4 warnings and 4 errors generated.

                    
Puntos totales: 0 / 100

Código

scanf("%d %d", &a, &b);
printf("%d\n", a + b);