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
Project Description: hi i need to develop a software scrapebox exect same with all Skills required: .NET, Java, C# Programming, Visual Basic, Visual Basic for Apps

Question: (a) The ObjectDataSource control is an alternative design approach to using AccessDataSource or SqlDataSource controls. Explain and illustrate how an ObjectDataSourc

Write a program interactively two integers using the method console.readline and int.parse and display their sum

What is the difference among synchronous postback and asynchronous postback? The difference between synchronous and asynchronous postback is as follows: Asynchronous postbac

Find out the Factorial - C# Program I've been trying so many codes for this but those codes didn't work well. Please write the code for find out the factorial of an integer nu

What are the advantages of Distributed Processing? Benefits of distributed programming are:- a. Security/Encapsulation b. Faster Problem solving c. Distributed databas

can we use sql data base with visual studio

Problem: (a) Define the term ViewState as used in the ASP.NET framework. (b) What is a StateBag class? Give a simple example to support your answer. (c) (i) Distingui

How would you implement inheritance using VB.NET? When we set out to execute a class using inheritance, we must first begin with an existing class from which we will derive our

What are Assemblies? Assembly is a single deployable unit that have information about the implementation of classes, structures and interfaces. It also keeps the information ab