fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. // your code goes here
  5. int a[50],b,i;
  6. for(i=0;i<25;i++)
  7. {
  8. scanf("%d",a[i]);
  9. for(j=i+1;j<25;j++)
  10. {
  11. if(a[j]<a[i])
  12. {
  13. b=a[i];
  14. a[i]=a[j];
  15. a[j]=b;
  16. }
  17. printf("%d",a[i]);
  18. }
  19.  
  20.  
  21. }
  22.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c: In function ‘main’:
prog.c:8:10: warning: format ‘%d’ expects argument of type ‘int *’, but argument 2 has type ‘int’ [-Wformat=]
  scanf("%d",a[i]);
          ^
prog.c:9:9: error: ‘j’ undeclared (first use in this function)
     for(j=i+1;j<25;j++)
         ^
prog.c:9:9: note: each undeclared identifier is reported only once for each function it appears in
prog.c:21:1: error: expected declaration or statement at end of input
 }
 ^
stdout
Standard output is empty