fork download
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5. float a,b,c,MAX,MID,MIN= 0;
  6. printf("\n enter a,b,c in order");
  7. scanf("%f", &a);
  8. scanf("%f", &b);
  9. scanf("%f", &c);
  10. if (a>=b && a>=c)
  11. {
  12. MAX = a;
  13. if (b>=c)
  14. {
  15. MID = b;
  16. MIN = c;
  17. }
  18. if (c>=b)
  19. {
  20. MID = c;
  21. MIN = b;
  22. }
  23. }
  24. if (b>=a && b>=c)
  25. {
  26. MAX = b;
  27. if (a>=c)
  28. {
  29. MID = a;
  30. MIN = c;
  31. }
  32. if (c>=a)
  33. {
  34. MID = c;
  35. MIN = a;
  36. }
  37. }
  38. if (c>=a && c>=b)
  39. {
  40. MAX = c;
  41. if (a>=b)
  42. {
  43. MID = a;
  44. MIN = b;
  45. }
  46. if (b>=a)
  47. {
  48. MID = b;
  49. MIN = a;
  50. }
  51. }
  52. printf("\nValue order is =%f%f%f",MAX,MID,MIN);
  53.  
  54. return 0;
  55. }
  56.  
  57.  
Success #stdin #stdout 0s 4552KB
stdin
3
2
1
stdout
 enter a,b,c in order
Value order is =3.0000002.0000001.000000