fork download
  1. #include <stdio.h>
  2.  
  3. void main()
  4. {
  5. int a;
  6.  
  7. printf("Enter the number");
  8. scanf("%d",&a);
  9. if(n>0)
  10. {
  11. printf("The given number is positive");
  12. }
  13. else
  14. {printf("The given number is negative");
  15. }
  16.  
  17. }
  18.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c:3:6: warning: return type of ‘main’ is not ‘int’ [-Wmain]
 void main()
      ^~~~
prog.c: In function ‘main’:
prog.c:9:5: error: ‘n’ undeclared (first use in this function)
  if(n>0)
     ^
prog.c:9:5: note: each undeclared identifier is reported only once for each function it appears in
stdout
Standard output is empty