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 advantages have Web services over Component Object Model (COM) and Distributed Component Object Model (DCOM)? The benefits of Web services over COM and DCOM are as follow

What is Thread.Join() in threading? There are 2 versions of Thread.Join :- Thread.join(). Thread.join(Integer) this returns a Boolean value. The Thread.Join


IT governance defined In this section, a short literature survey will be conducted. The results will be presented in a final comparative table. Before starting defining IT gove

I want a C# school project Project Description: The project is made in C# and haves a database connection. We have some small problems asking up data from the database.

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

Question: (a) Write extract codes to show the structure of the Global.asax file. (b) Outline four classes that allow you to work with File Streams. (c) When working with

What is the use of connection object? The connection objects are used to connect a data to the Command object. 1)An OleDbConnection object is used with the  OLE-DB provider

Project Description: Someone to review all our IT systems / dfs replication / set up/ backups etc and give a report. Skills required: SQL, Microsoft Exchange, Windows Serv

Program for Declaration and Additions of Variables, I am a learner of C# language and i am struggling with the declaration of variables in C#. Can you have any code examples for th