fork download
  1. #include <stdio.h>
  2.  
  3. void main( void )
  4. {
  5. float a, b, c, d, x;
  6.  
  7. printf("a:");
  8. scanf("%f", &a);
  9. printf("b:");
  10. scanf("%f", &b);
  11. printf("c:");
  12. scanf("%f", &c);
  13. printf("d:");
  14. scanf("%f", &d);
  15.  
  16. if (a > b)
  17. {
  18. x = a;
  19. a = b ;
  20. b = x ;
  21. }
  22. if (b > c)
  23. {
  24. x = c;
  25. c = b ;
  26. b = x ;
  27. }
  28. if (c > d)
  29. {
  30. x = c;
  31. c = d;
  32. d = x;
  33. }
  34. if (a > b)
  35. {
  36. x = a;
  37. a = b;
  38. b = x;
  39. }
  40. if (b > c)
  41. {
  42. x = b;
  43. b = c;
  44. c = x;
  45. }
  46. if (a > b)
  47. {
  48. x = a;
  49. a = b;
  50. b = x;
  51. }
  52.  
  53. printf("%f, %f, %f, %f\n",a, b, c, d)
  54. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(2,0): error CS1024: Wrong preprocessor directive
prog.cs(3,0): error CS1525: Unexpected symbol `void'
Compilation failed: 2 error(s), 0 warnings
stdout
Standard output is empty