fork download
  1. /#include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main(void)
  5. {
  6. int x,tabla[5];
  7. int sum;
  8.  
  9. for (x=0;x<10;x++)
  10. {
  11. printf("Introduzca un número\n");
  12. scanf("%d",&tabla[x]);
  13. }
  14.  
  15. sum=tabla[0];
  16.  
  17.  
  18. for (x=1;x<10;x++)
  19. {
  20. sum=sum+tabla[x];
  21.  
  22. }
  23.  
  24. printf("Suma: %d\n",sum);
  25.  
  26.  
  27. system("PAUSE");
  28. return 0;
  29. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c:1:1: error: expected identifier or '(' before '/' token
 /#include <stdio.h>
 ^
prog.c:1:2: error: stray '#' in program
 /#include <stdio.h>
  ^
In file included from prog.c:2:0:
/usr/include/stdlib.h:139:8: error: unknown type name 'size_t'
 extern size_t __ctype_get_mb_cur_max (void) __THROW __wur;
        ^
/usr/include/stdlib.h:466:22: error: unknown type name 'size_t'
 extern void *malloc (size_t __size) __THROW __attribute_malloc__ __wur;
                      ^
/usr/include/stdlib.h:468:22: error: unknown type name 'size_t'
 extern void *calloc (size_t __nmemb, size_t __size)
                      ^
/usr/include/stdlib.h:468:38: error: unknown type name 'size_t'
 extern void *calloc (size_t __nmemb, size_t __size)
                                      ^
/usr/include/stdlib.h:480:36: error: unknown type name 'size_t'
 extern void *realloc (void *__ptr, size_t __size)
                                    ^
/usr/include/stdlib.h:509:29: error: unknown type name 'size_t'
 extern void *aligned_alloc (size_t __alignment, size_t __size)
                             ^
/usr/include/stdlib.h:509:49: error: unknown type name 'size_t'
 extern void *aligned_alloc (size_t __alignment, size_t __size)
                                                 ^
/usr/include/stdlib.h:756:9: error: unknown type name 'size_t'
         size_t __nmemb, size_t __size, __compar_fn_t __compar)
         ^
/usr/include/stdlib.h:756:25: error: unknown type name 'size_t'
         size_t __nmemb, size_t __size, __compar_fn_t __compar)
                         ^
In file included from /usr/include/stdlib.h:760:0,
                 from prog.c:2:
/usr/include/i386-linux-gnu/bits/stdlib-bsearch.h:20:49: error: unknown type name 'size_t'
 bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size,
                                                 ^
/usr/include/i386-linux-gnu/bits/stdlib-bsearch.h:20:65: error: unknown type name 'size_t'
 bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size,
                                                                 ^
In file included from prog.c:2:0:
/usr/include/stdlib.h:765:34: error: unknown type name 'size_t'
 extern void qsort (void *__base, size_t __nmemb, size_t __size,
                                  ^
/usr/include/stdlib.h:765:50: error: unknown type name 'size_t'
 extern void qsort (void *__base, size_t __nmemb, size_t __size,
                                                  ^
/usr/include/stdlib.h:863:36: error: unknown type name 'size_t'
 extern int mblen (const char *__s, size_t __n) __THROW;
                                    ^
/usr/include/stdlib.h:867:34: error: unknown type name 'size_t'
      const char *__restrict __s, size_t __n) __THROW;
                                  ^
/usr/include/stdlib.h:874:8: error: unknown type name 'size_t'
 extern size_t mbstowcs (wchar_t *__restrict  __pwcs,
        ^
/usr/include/stdlib.h:875:32: error: unknown type name 'size_t'
    const char *__restrict __s, size_t __n) __THROW;
                                ^
/usr/include/stdlib.h:877:8: error: unknown type name 'size_t'
 extern size_t wcstombs (char *__restrict __s,
        ^
/usr/include/stdlib.h:878:38: error: unknown type name 'size_t'
    const wchar_t *__restrict __pwcs, size_t __n)
                                      ^
prog.c: In function 'main':
prog.c:11:9: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
         printf("Introduzca un número\n");
         ^
prog.c:11:9: warning: incompatible implicit declaration of built-in function 'printf'
prog.c:11:9: note: include '<stdio.h>' or provide a declaration of 'printf'
prog.c:12:9: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
         scanf("%d",&tabla[x]);
         ^
prog.c:12:9: warning: incompatible implicit declaration of built-in function 'scanf'
prog.c:12:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
prog.c:24:13: warning: incompatible implicit declaration of built-in function 'printf'
             printf("Suma: %d\n",sum);
             ^
prog.c:24:13: note: include '<stdio.h>' or provide a declaration of 'printf'
stdout
Standard output is empty