fork download
  1. #include <stdio.h>
  2.  
  3. #define Freq400
  4. #define Freq200 8
  5. #define Freq100 16
  6. #define Freq50 32
  7. #define Freq40 40
  8. #define Freq32 50
  9.  
  10. enum { Freq400=4, Freq200=8, Freq100=16, Freq50=32, Freq40=40, Freq32=50};
  11.  
  12. int main(void) {
  13. // your code goes here
  14. int x= rand();
  15. printf ("%i rand:", x);
  16. if(x >= Freq400 && x <= Freq32 )
  17. printf ("available");
  18. else printf("error");
  19. return 0;
  20. }
  21.  
Compilation error #stdin compilation error #stdout 0s 9432KB
stdin
Standard input is empty
compilation info
prog.c:10:15: error: expected identifier before ‘=’ token
 enum { Freq400=4, Freq200=8, Freq100=16, Freq50=32, Freq40=40, Freq32=50};
               ^
prog.c: In function ‘main’:
prog.c:14:9: warning: implicit declaration of function ‘rand’ [-Wimplicit-function-declaration]
  int x= rand();
         ^~~~
prog.c:16:7: warning: comparison between pointer and integer
  if(x >= Freq400 && x <= Freq32 )
       ^~
prog.c:16:23: warning: comparison of constant ‘50’ with boolean expression is always true [-Wbool-compare]
  if(x >= Freq400 && x <= Freq32 )
                       ^~
prog.c:16:7: warning: comparisons like ‘X<=Y<=Z’ do not have their mathematical meaning [-Wparentheses]
  if(x >= Freq400 && x <= Freq32 )
     ~~^~~~~~~~~~~~~~~
prog.c:16:2: error: label ‘x’ used but not defined
  if(x >= Freq400 && x <= Freq32 )
  ^~
stdout
Standard output is empty