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

Envío 698

Problema 0x78 - Suma de 2 números

  • Autor: davidarias
  • Fecha: 2020-09-14 07:33:32 UTC (Hace más de 3 años)
Caso # Resultado Tiempo Memoria
#1
Correcto
                      main.c:5:17: warning: format specifies type 'int *' but the argument has type 'long *' [-Wformat]
  scanf("%d%d", &a, &b);
         ~~     ^~
         %ld
main.c:5:21: warning: format specifies type 'int *' but the argument has type 'long *' [-Wformat]
  scanf("%d%d", &a, &b);
           ~~       ^~
           %ld
main.c:6:16: warning: format specifies type 'int' but the argument has type 'long' [-Wformat]
  printf("%d", a + b);
          ~~   ^~~~~
          %ld
3 warnings generated.

                    
0.006 s 1 KBi
#2
Correcto
                      main.c:5:17: warning: format specifies type 'int *' but the argument has type 'long *' [-Wformat]
  scanf("%d%d", &a, &b);
         ~~     ^~
         %ld
main.c:5:21: warning: format specifies type 'int *' but the argument has type 'long *' [-Wformat]
  scanf("%d%d", &a, &b);
           ~~       ^~
           %ld
main.c:6:16: warning: format specifies type 'int' but the argument has type 'long' [-Wformat]
  printf("%d", a + b);
          ~~   ^~~~~
          %ld
3 warnings generated.

                    
0.005 s 1 KBi
#3
Correcto
                      main.c:5:17: warning: format specifies type 'int *' but the argument has type 'long *' [-Wformat]
  scanf("%d%d", &a, &b);
         ~~     ^~
         %ld
main.c:5:21: warning: format specifies type 'int *' but the argument has type 'long *' [-Wformat]
  scanf("%d%d", &a, &b);
           ~~       ^~
           %ld
main.c:6:16: warning: format specifies type 'int' but the argument has type 'long' [-Wformat]
  printf("%d", a + b);
          ~~   ^~~~~
          %ld
3 warnings generated.

                    
0.006 s 1 KBi
#4
Correcto
                      main.c:5:17: warning: format specifies type 'int *' but the argument has type 'long *' [-Wformat]
  scanf("%d%d", &a, &b);
         ~~     ^~
         %ld
main.c:5:21: warning: format specifies type 'int *' but the argument has type 'long *' [-Wformat]
  scanf("%d%d", &a, &b);
           ~~       ^~
           %ld
main.c:6:16: warning: format specifies type 'int' but the argument has type 'long' [-Wformat]
  printf("%d", a + b);
          ~~   ^~~~~
          %ld
3 warnings generated.

                    
0.005 s 1 KBi
#5
Correcto
                      main.c:5:17: warning: format specifies type 'int *' but the argument has type 'long *' [-Wformat]
  scanf("%d%d", &a, &b);
         ~~     ^~
         %ld
main.c:5:21: warning: format specifies type 'int *' but the argument has type 'long *' [-Wformat]
  scanf("%d%d", &a, &b);
           ~~       ^~
           %ld
main.c:6:16: warning: format specifies type 'int' but the argument has type 'long' [-Wformat]
  printf("%d", a + b);
          ~~   ^~~~~
          %ld
3 warnings generated.

                    
0.005 s 1 KBi
Puntos totales: 100 / 100

Código

#include <stdio.h>
int main(void)
{
  long int a = 0, b = 0;
  scanf("%d%d", &a, &b);
  printf("%d", a + b);
  return (0);
}