Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*Mary Kwong*/
- #include <stdio.h> //printf, scanf functions
- #include <math.h> //math functions and operations
- double celsius_at_depth(double kilometers);
- double fahrenheit(double kilometers);
- int main(void)
- {
- double kilometers
- printf("Enter depth in kilometers=> ");
- scanf("%lf", &kilometers);
- printf("The temperature is %f degrees C or %f degrees F.\n",
- double celsius_at_depth(double kilometers)
- {
- return ((10 * kilometers) + 20);
- }
- double fahrenheit(double kilometers)
- {
- return((((10 * kilometers) + 20) * (9 / 5)) + 32);
- }
Add Comment
Please, Sign In to add comment