Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #define FAKTOR 5.0 / 9.0
- double fahr2celsius(double fahr);
- int main (void)
- {
- double fahr = 0.0;
- double celsi;
- printf("*** Umrechnung Fahrenheit nach Celsius ***"\n \n);
- printf("Geben Sie eine Temperatur in Fahrenheit ein:");
- scanf(%lf", &fahr);
- celsi = fahr2celsius(fahr);
- printf("%.1f Grad Fahrenheit entsprechen %.1f Grad Celsius. \n", fahr, celsi);
- return 0;
- }
- double fahr2celsius(double fahr){
- return FAKTOR * fahr - 32;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement