Advertisement
Guest User

Untitled

a guest
Apr 24th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.46 KB | None | 0 0
  1. #include <stdio.h>
  2. #define FAKTOR 5.0 / 9.0
  3. double fahr2celsius(double fahr);
  4.  
  5. int main (void)
  6. {
  7. double fahr = 0.0;
  8. double celsi;
  9.  
  10. printf("*** Umrechnung Fahrenheit nach Celsius ***"\n \n);
  11. printf("Geben Sie eine Temperatur in Fahrenheit ein:");
  12. scanf(%lf", &fahr);
  13.  
  14. celsi = fahr2celsius(fahr);
  15.  
  16. printf("%.1f Grad Fahrenheit entsprechen %.1f Grad Celsius. \n", fahr, celsi);
  17.  
  18. return 0;
  19. }
  20.  
  21. double fahr2celsius(double fahr){
  22. return FAKTOR * fahr - 32;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement