Converting temperature from fahrenheit to celsius in c#, DOT NET Programming

Converting temperature from Fahrenheit to Celsius - Program C#

I am facing some problems in the code for Converting temperature from Fahrenheit to Celsius. Can anybody suggest me the proper code for it.

Posted Date: 2/11/2013 7:12:40 AM | Location : United States





using System;  

class Temperature

{

  public static void Main()

 {

   float fahrenheit,celcius;

   string s;

  Console.Write("Enter the temperature in fahrenheit : ");

  s = Console.ReadLine();

  fahrenheit = float.Parse(s);

  celcius = (float)((fahrenheit-32)/1.8);

  Console.WriteLine("The Temperature in celcius = " +celcius);

  Console.ReadLine();

 }

}

Posted by Jermy | Posted Date: 2/11/2013 7:14:34 AM


Related Discussions:- Converting temperature from fahrenheit to celsius in c#, Assignment Help, Ask Question on Converting temperature from fahrenheit to celsius in c#, Get Answer, Expert's Help, Converting temperature from fahrenheit to celsius in c# Discussions

Write discussion on Converting temperature from fahrenheit to celsius in c#
Your posts are moderated
Related Questions
What are LeaseTime, Sponsorship Time, Renew on Call Time and Lease Manager Poll Time? In the normal .NET environment objects lifetime is managed by garbage collector. But inrem

What is ReaderWriter Locks? You may want to lock the resource only whenever data is being written and permit multiple clients to parallel read data when data is not being updat

Screen sharing Training software like GOTOMEETING Project Description: We do have online trainings business; we are providing trainings with webex or gotomeeting at this mome

What are basic methods of Data adapter? The three most commonly used methods of Dataadapter are as follows:- 1)Fill :- It Executes the SelectCommand to fill the DataSet ob

What are the different elements in Functions points? 1) Internal Logical Files (ILF): Following are some points to be noted for ILF:- The ILF are logically related d

Question: (a) Give four benefits of ASP.NET Web Controls. (b) List and explain any five properties of the ValidationSummary control. (c) Multiple Web Form controls ca

What is the difference between "DataSet" and "DataReader"? The major differences between "DataSet" and "DataReader" are as follows:- 1)The "DataSet" is a disconnected archit

How Output cache functionality is achieved? The Output cache functionality is achieved by using the "OutputCache" attribute on ASP.NET page header. The syntax is shown below:

Data hiding and encryption would be done on images. Both these process should have a data hiding key and an encryption key correspondingly. Another user should be able to decrypt t

What is CMMI? This is a collection of instructions an organization can follow with the purpose to gain the better control over its software development process. According to