How To Write A C Program To Convert Fahrenheit To Celsius For A Beginner.

Asked By 0 points N/A Posted on -
qa-featured

I have just started learning C language in computers. I am able to solve some easy problems but I have stuck at the problem of how to write a c program to convert fahrenheit to celsius. Does anyone know the source code for this condition? If yes, please post.

 

SHARE
Answered By 0 points N/A #293166

How To Write A C Program To Convert Fahrenheit To Celsius For A Beginner.

qa-featured

Here’s your code:

#include <stdio.h>

int main()

{

float cs, ft;

printf(“Enter temp. in Fahrenheit: \n”);

scanf(“%f”, &ft);

// Convert thetemp. from fahrenheit to celsius

cs= (ft- 32) * 5 / 9;

printf(” Temperature in Celsius:  %f “, cs);

return 0;

}

The output of the program will be

Related Questions