fork download
  1. #include <stdio.h>
  2. int run_1 ()
  3. {
  4. float a, b, c;
  5. a = 2.4;
  6. b = 3.8;
  7. c = a / b;
  8. printf("Floats (a,b) and quotient (c) are: %.2f, %.2f, and %.2f \n", a,b,c);
  9. }
  10. #include <stdio.h>
  11. int run_2 ()
  12. {
  13. float a, b, c;
  14. a = 24.5;
  15. b = 7.9;
  16. c = a / b;
  17. printf("Floats (a,b) and quotient (c) are: %.2f, %.2f, and %.2f \n", a,b,c);
  18. }
  19. #include <stdio.h>
  20. int run_3 ()
  21. {
  22. float a, b, c;
  23. a = 0.12;
  24. b = 1.49;
  25. c = a / b;
  26. printf("Floats (a,b) and quotient (c) are: %.2f, %.2f, and %.2f \n", a,b,c);
  27. }
  28. #include <stdio.h>
  29. int run_4 ()
  30. {
  31. float a, b, c;
  32. a = 5.67;
  33. b = 4.12;
  34. c = a / b;
  35. printf("Floats (a,b) and quotient (c) are: %.2f, %.2f, and %.2f \n", a,b,c);
  36. }
  37. int main ()
  38. {
  39. run_1 ();
  40. run_2 ();
  41. run_3 ();
  42. run_4 ();
  43. return 0;
  44. }
Success #stdin #stdout 0s 2168KB
stdin
Standard input is empty
stdout
Floats (a,b) and quotient (c) are: 2.40, 3.80, and 0.63 
Floats (a,b) and quotient (c) are: 24.50, 7.90, and 3.10 
Floats (a,b) and quotient (c) are: 0.12, 1.49, and 0.08 
Floats (a,b) and quotient (c) are: 5.67, 4.12, and 1.38