fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. float mediaum,mediadois,mediatres,mediaquatro;
  5. printf("Digite a media da primeira unidade");
  6. scanf('%f',mediaum);
  7. printf();
  8. printf("Digite a media da segunda unidade");
  9. scanf('%f',mediadois);
  10. printf();
  11. printf("Digite a media da terceira unidade");
  12. scanf('%f',mediatres);
  13. printf();
  14. printf("Digite a media da quarta unidade");
  15. scanf('%f',mediaquatro);
  16. printf();
  17.  
  18. int quantbimestres = 4;
  19.  
  20. float mediafinal = (mediaum + mediadois + mediatres + mediaquatro)/quantbimestres;
  21. printf('%f',mediafinal);
  22.  
  23.  
  24. return 0;
  25. }
  26.  
Compilation error #stdin compilation error #stdout 0s 2012KB
stdin
Standard input is empty
compilation info
prog.c: In function 'main':
prog.c:6:8: warning: multi-character character constant [-Wmultichar]
  scanf('%f',mediaum);
        ^
prog.c:6:8: warning: passing argument 1 of 'scanf' makes pointer from integer without a cast
In file included from /usr/include/features.h:374:0,
                 from /usr/include/stdio.h:27,
                 from prog.c:1:
/usr/include/stdio.h:446:12: note: expected 'const char * __restrict__' but argument is of type 'int'
 extern int __REDIRECT (scanf, (const char *__restrict __format, ...),
            ^
prog.c:7:2: error: too few arguments to function 'printf'
  printf();
  ^
prog.c:9:8: warning: multi-character character constant [-Wmultichar]
  scanf('%f',mediadois);
        ^
prog.c:9:8: warning: passing argument 1 of 'scanf' makes pointer from integer without a cast
In file included from /usr/include/features.h:374:0,
                 from /usr/include/stdio.h:27,
                 from prog.c:1:
/usr/include/stdio.h:446:12: note: expected 'const char * __restrict__' but argument is of type 'int'
 extern int __REDIRECT (scanf, (const char *__restrict __format, ...),
            ^
prog.c:10:2: error: too few arguments to function 'printf'
  printf();
  ^
prog.c:12:8: warning: multi-character character constant [-Wmultichar]
  scanf('%f',mediatres);
        ^
prog.c:12:8: warning: passing argument 1 of 'scanf' makes pointer from integer without a cast
In file included from /usr/include/features.h:374:0,
                 from /usr/include/stdio.h:27,
                 from prog.c:1:
/usr/include/stdio.h:446:12: note: expected 'const char * __restrict__' but argument is of type 'int'
 extern int __REDIRECT (scanf, (const char *__restrict __format, ...),
            ^
prog.c:13:2: error: too few arguments to function 'printf'
  printf();
  ^
prog.c:15:8: warning: multi-character character constant [-Wmultichar]
  scanf('%f',mediaquatro);
        ^
prog.c:15:8: warning: passing argument 1 of 'scanf' makes pointer from integer without a cast
In file included from /usr/include/features.h:374:0,
                 from /usr/include/stdio.h:27,
                 from prog.c:1:
/usr/include/stdio.h:446:12: note: expected 'const char * __restrict__' but argument is of type 'int'
 extern int __REDIRECT (scanf, (const char *__restrict __format, ...),
            ^
prog.c:16:2: error: too few arguments to function 'printf'
  printf();
  ^
prog.c:21:9: warning: multi-character character constant [-Wmultichar]
  printf('%f',mediafinal);
         ^
prog.c:21:9: warning: passing argument 1 of 'printf' makes pointer from integer without a cast
In file included from prog.c:1:0:
/usr/include/stdio.h:362:12: note: expected 'const char * __restrict__' but argument is of type 'int'
 extern int printf (const char *__restrict __format, ...);
            ^
stdout
Standard output is empty