fork download
  1. #include <stdio.h>
  2. float fahrenheit_to_celsius(float f)
  3. {
  4. return ((f - 32.0) * 5.0 / 9.0);
  5. }
  6.  
  7. // Driver code
  8. int main()
  9. {
  10. float f = 40;
  11.  
  12. // Passing parameter to function
  13. printf("Temperature in Degree Celsius : %0.2f",
  14. fahrenheit_to_celsius(f));
  15.  
  16.  
  17.  
  18.  
  19. // your code goes here
  20. return 0;
  21. }
  22.  
Success #stdin #stdout 0s 5320KB
stdin
Standard input is empty
stdout
Temperature in Degree Celsius : 4.44