fork(1) download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int a,d;
  5. scanf("%d",&a);
  6. int m[f];
  7. for(int j=0;j<a;j++);
  8. { scanf("%d",&m[j]);
  9. }
  10. for(int h=0;h<a;h++)
  11. { for(int g=1;g<a;g++)
  12. { d=m[0];
  13. if(m[j]<m[i])
  14. { d=m[j];
  15. m[i+1]=m[0];
  16. m[j+1]=m[i];
  17. }
  18. else
  19. d=m[0];
  20. }
  21. for(i=0;i<a;i++){
  22. printf("%d",m[i]);}
  23. // your code goes here
  24. return 0;
  25. }
  26.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
3 1 3 2
compilation info
prog.c: In function ‘main’:
prog.c:6:11: error: ‘f’ undeclared (first use in this function)
     int m[f];
           ^
prog.c:6:11: note: each undeclared identifier is reported only once for each function it appears in
prog.c:8:22: error: ‘j’ undeclared (first use in this function)
    {   scanf("%d",&m[j]);
                      ^
prog.c:13:24: error: ‘i’ undeclared (first use in this function)
              if(m[j]<m[i])
                        ^
prog.c:25:1: error: expected declaration or statement at end of input
 }
 ^
prog.c:6:9: warning: unused variable ‘m’ [-Wunused-variable]
     int m[f];
         ^
prog.c:4:11: warning: variable ‘d’ set but not used [-Wunused-but-set-variable]
     int a,d;
           ^
prog.c:5:5: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d",&a);
     ^~~~~~~~~~~~~~
stdout
Standard output is empty