fork(1) download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. float SortInc3(float a,float b,float c){
  4. if(b<c)
  5. {float p=b;
  6. b=*c;
  7. c=p;};
  8. if(a<c)
  9. {float p=a;
  10. a=c;
  11. c=p;};
  12. if(a<b)
  13. {float p=a;
  14. a=b;
  15. b=p;};
  16. }
  17. int main(void){
  18. float a=1;
  19. float b=3;
  20. float c=2;
  21. SortInc3(a,b,c);
  22. printf("\n%f",a);
  23. printf("\n%f",b);
  24. printf("\n%f",c);
  25. a=11;
  26. b=33;
  27. c=22;
  28. SortInc3(a,b,c);
  29. printf("\n%f",a);
  30. printf("\n%f",b);
  31. printf("\n%f",c);
  32. };
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c: In function ‘SortInc3’:
prog.c:6:3: error: invalid type argument of unary ‘*’ (have ‘float’)
 b=*c;
   ^~
prog.c:16:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
stdout
Standard output is empty