Question: C# SAMPLE CODE: using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace SimpleTempConversion { /* Class to convert Celsius temperature to Fahrenheit * Author ....

C# SAMPLE CODE:

using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace SimpleTempConversion { /* Class to convert Celsius temperature to Fahrenheit * Author .... * Date: July 2015 */ class CelsiusToFahrenheit { public static void Main() { double celsius = 0.0; //input the temperature in degrees Celsius Console.Write("Enter degrees Celsius: "); celsius = int.Parse(Console.ReadLine());

// Calculate degrees Fahrenheit and output the result Console.WriteLine(" The equivalent in Fahrenheit is " + celsius/5 * 9 + 32);

Console.WriteLine(" Hit Enter to exit."); Console.ReadLine(); } } }

C# SAMPLE CODE: using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace

The source code for the program is given below. It is a simple program that takes a temperature in degrees Celsius from the user and displays the same temperature in degrees Fahrenheit; the reverse of a program you wrote for last week's AMS exercises The code contains no input validation. The only requirement is that, if you enter a valid number, it should display the correct converted temperature This is an example of what the program should do when you run it: nter degrees Celsius 100 he equivalent in Fahrenheit is 212 Hit Enter to exit

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!