//******************************************************** // // C Midterm - Question 7 // // Name: Maya Mahin // // Class: C Programming, Spring 2025 // // Date: March 23, 2025 // // Description: Program which facilitates the conversion of fahrenheit to // celsius temperatures and vice versa // //******************************************************** #include <stdio.h> float toCelsius(float fahrenheitTemp); float toFahrenheit(float celsiusTemp); int main(void) { for (int i=32; i<213; i++) { float celsiusRetVal=toCelsius(i); } for (int i=0; i<101; i++) { float fahrenheitRetVal=toFahrenheit(i); } return 0; } //************************************************************** // Function: toCelsius // // Purpose: Receives a temperature in fahrenheit, converts it // to Celsius and returns the converted value // // Parameters: // // temp - input temperature in fahrenheit // // Returns: temp_convert - input temperature in celsius // //************************************************************** float toCelsius(float fahrenheitTemp){ float celsiusTemp=(fahrenheitTemp - 32) * 5/9; return celsiusTemp; } //************************************************************** // Function: toFahrenheit // // Purpose: Receives a temperature in celsius, converts it // to Fahrenheit and returns the converted value // // Parameters: // // temp - input temperature in celsius // // Returns: temp_convert - input temperature in fahrenheit // //************************************************************** float toFahrenheit(float celsiusTemp){ float fahrenheitTemp=(celsiusTemp * 9/5) + 32; return fahrenheitTemp; }
Standard input is empty
The temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Celsius forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit forThe temperature in Fahrenheit for