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
I want simple code for Outlook (express,2003,2007,2010,2013) Add-In with functionality to routinely send CC to the specified email(s), this system should have -Code for every th

What are ASP.NET session and compare it with classic ASP session The ASP.NET session caches per user session state. It basically uses "HttpSessionState" class. The limitatio

What is the main difference b/w MSML and .NET Framework XML classes? The MSXML supports XML DOM and SAX parsers while the .NET framework XML classes support XML DOM and XML rea

Question: (a) Explain the function of the main .NET data objects: Connection, Command, DataReader, DataAdapter, DataSet, DataTableCollection, and DataView. (b) Describe h



What is Delegation? A delegate seems like a strongly type function pointer. Delegates can request the methods that they reference without making explicit calls to those methods

Write a C# program (C# console application) that plays a word game with the user. The program should ask the user to enter the following: • His or her name • His or her age

I want Windows 8.1 Metro style app development Project Description: I want Windows 8 & 8.1 metro style app development - Media Player application Skills required are C# Pr

Nutritional properties of Processing food Processing food, you may have realized that many desirable changes occur, which include development of pleasing colours and flavors, i