fork download
  1. #include <stdio.h>
  2.  
  3. /* Factorial 5! = 5*4*3*2*1 */
  4.  
  5. main ()
  6. {
  7. int Wert;
  8. int fak = 1;
  9.  
  10. scanf ("%d", Wert);
  11.  
  12. while ( Wert > fak) {
  13. fak = fak * Wert;
  14. Wert = Wert - 1;
  15. printf ("%d", fak);
  16. }
  17. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c:5:1: error: return type defaults to ‘int’ [-Werror=implicit-int]
 main ()
 ^~~~
prog.c: In function ‘main’:
prog.c:10:14: error: format ‘%d’ expects argument of type ‘int *’, but argument 2 has type ‘int’ [-Werror=format=]
     scanf ("%d", Wert);
              ^
prog.c:10:5: error: ‘Wert’ is used uninitialized in this function [-Werror=uninitialized]
     scanf ("%d", Wert);
     ^~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
stdout
Standard output is empty