Click here to Skip to main content
15,891,692 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
program to convert the temperature from fahrenheit to celsius and
vice versa.also incorporate a feature so that the temperature conversion is
possible for all data types like integer,float and so on?
Posted
Updated 4-Feb-13 23:12pm
v2
Comments
CHill60 5-Feb-13 5:11am    
So whereabouts are you stuck? Or what error have you come across. Have you actually tried anything or do you just want us to do your homework for you????

try this
C#
public double GetFahrenheitForCelsius(double celsius)
{
    return (9 / 5) * celsius + 32;
}

hope this helps
 
Share this answer
 
Comments
Alan N 5-Feb-13 6:04am    
integer division!
 
Share this answer
 
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900