Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C programing: Modify the program to compute the conversion from Fahrenheit to Celsius in a function called tocelsius(). The prototype for this function is: float

C programing:

Modify the program to compute the conversion from Fahrenheit to Celsius in a function called tocelsius(). The prototype for this function is:

 float tocelsius(float fahrenheit); /* Given: a temperature reading in degrees Fahrenheit Returns: the temperature in degrees Celsius */ 

Modify the driver, main(), to prompt the user to enter a temperature in Fahrenheit, convert the value using the function and print the result. The driver should loop asking the user for input until a special data value is entered. Since 0 is a valid Fahrenheit temperature, we need something else. Physics tells us that no temperature can be lower than absolute zero (-273 degrees C, or -459 degrees F), let's use -500 as the special data value to terminate Fahrenheit input.

My code for convert F to C

#include void main() { float F,C; printf("F:"); scanf("%f",&F); C = (F-32)*5/9; printf("C:%.2f ",C); }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database Management Systems

Authors: Mark L. Gillenson

3rd Edition

978-1119907466

More Books

Students also viewed these Databases questions

Question

WIP inventories:

Answered: 1 week ago

Question

Has each action got a clear and measurable outcome?

Answered: 1 week ago

Question

Have you eliminated jargon and unexplained acronyms?

Answered: 1 week ago