Program that will convert temp

As far as i made this is what my program looks like.. but whatever value you have entered in the celsius the result of farenheit is 0

{


cout << "Enter Celsius temperature: ";

fahrenheit = (5/9) * (celsius + 32);
cout << "Fahrenheit = " << fahrenheit << endl;


Help me to finish correctly this code
Last edited on
the problem is the integer division: (5/9) -> 0. Change that to:

fahrenheit = (5.0/9) * (celsius + 32);
Thank you very much :D it works.
Topic archived. No new replies allowed.