Click here to Skip to main content
12,622,741 members (28,132 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C# SQL C#4.0
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 5-Feb-13 0:04am
Updated 5-Feb-13 0:12am
phil.o87.8K
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????
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

try this
public double GetFahrenheitForCelsius(double celsius)
{
    return (9 / 5) * celsius + 32;
}
hope this helps
  Permalink  
Comments
Alan N 5-Feb-13 6:04am
   
integer division!
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 3

  Permalink  

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.161128.1 | Last Updated 5 Feb 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100