I WANT THIS BUT I CAN NOT UNDER STAND PLZ HELP WHAT CHANGES I SHOUL DO HERE
I WANT TO MAKE quick estimation by taking the temperature in Celsius, double it and add 32 AND WANT TO Write a program that takes temperature in Celsius; convert it to Fahrenheit both in estimation method and actual method. Run the program at least for 10 values and print the temperature in the form of a table showing temperature in Celsius,estimated temperature in Fahrenheit and actualtemperature in Fahrenheit.

``````#define F_LOW 0
#define F_MAX 250
#define STEP 25
main()
{
typedef float REAL ;
REAL celsius, efahrenheit, afahrenheit;
celsius = F_LOW ;
printf("celsius       Estimated Temp in Fahrenheit      Actual Temp in Fahrenheit   \n  \n  \n") ;
while( celsius <= F_MAX )
{
efahrenheit = ( celsius * 1.8)+ 32.0;
afahrenheit = ( celsius * 1.8) +32.0;
printf("%-2.1f       %-10.2f           %-22.2f  \n", celsius, efahrenheit, afahrenheit);
celsius = celsius + STEP ;
getchar();
}
}
``````

Edited by deceptikon: Changed to a discussion thread, fixed indentation

3
Contributors
2
Replies
4
Views
5 Years
Discussion Span
Last Post by deben.salemme

So...what output does the program produce and how is that not what you want?

try beginning first with 1 value
and then go for ten or more
with the while loop.
first read the value in celsius, also the simple scanf, no?
then convert, saving the two variables,
and then print the output. :)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.