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 is CodeDom The "CodeDom" is an object model that represents actually a source code. It is designed for language independent - once you create a "CodeDom" hierarchy for a p

Need to copy values from one database to another AND Enhancements in MVC website. Project Description: Basically, you are asked to create an app that copy values from one DB

I have a page that I require a few pieces of data to be pulled out of. The page is such that it needs interaction; there is a little bit of data entry to get the needed data, and t

What are the core functionalities in XML .NET framework? The XML API for the .NET Framework includes the following set of functionalities: XML readers With XML readers

The Events are always public as they are meant to serve each one registering to it. But you can access modifiers in the events.You may have events with protected keyword which will

Explain project life cycle. Figure: -Life cycle of a project There are 5 stages of any project initiating, planning, executing, controlling, & closeout. These are the


A fresh web project utilizing ASP.NET 4.5, MVC 5 with Visual Studio 2013 a) Excellent web layout DESIGN skills using CSS. b) Solid experience with ASP.NET 4.0 MVC 4. c) Cu

cookieless="false" timeout="20" /> Above is sample session state mode specified for SQL SERVER.

Question: (a) Explain the Postback process as use with Web Forms. (b) Write extract codes to demonstrate how to store and retrieve values in: (i) a Session Object (ii)