Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <math.h>
- int temp_change(fahrenheit);
- int main()
- {
- while(1)
- {
- int fahrenheit;
- printf("Please input a temperature in Fahrenheit.n");
- scanf("%d", &fahrenheit); //Obtains degrees F value
- printf("%dn", temp_change(fahrenheit));
- }
- }
- //Function to change temperature
- int temp_change(fahrenheit)
- {
- int centigrade;
- centigrade = 5*(fahrenheit - 32)/9; //Changing the temperature
- return centigrade;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement