Hi everyone,
I am trying to get a c# console app to convert tempratures for me.
This is my very very first app.
I started reading C# for dummies tonight and felt inspired after completing the first tutorial successfully.
I maybe trying to run before i can walk, but anyway here's my code so far.
CODE
using System;
namespace ConsoleAppTemplate
{ // these are curly braces
// class Program is the “object” containing our code
public class Program
{
// This is where our program starts
// Every program has a Main() method somewhere
static void Main(string[] args)
{
// here’s our code to make it do something
// prompt user to enter a name
Console.WriteLine("Enter the temprature in farhenheit, please:");
// now read the name entered
int nFarh = int.Parse(Console.ReadLine());
int nCels;
nCels = (nFarh - 32) * (5.0 / 9.0);
// Now Show the user the Celsius conversion
Console.WriteLine("The Temprature is Celsius =, " + nCels);
// wait for user to acknowledge the results
Console.WriteLine("Press Enter to terminate...");
Console.Read();
//code in Main() ends here
} // Main() ends here
} // class Program ends here
} // namespace ConsoleAppTemplate ends here