Input Output Console App

[code language=”csharp”] using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Input_Output
{
class Program
{
static void Main(string[] args)
{
// Declarations
string Name;
string temp;
int Age;
double Temperature;
bool goodInput;

// input a string
Console.Write("Please enter your name: ");
Name = Console.ReadLine();
// output a string
Console.WriteLine("You entered " + Name);

//input/output integer
Console.Write("Please enter your age: ");
temp = Console.ReadLine();

while (!Int32.TryParse(temp, out Age))
{
Console.Write("Please enter a number for your age: ");
temp = Console.ReadLine();
}
Console.WriteLine("Your age is " + Age);

//input/output double
Console.Write("Please enter the Temperature: ");
temp = Console.ReadLine();

while (!Double.TryParse(temp, out Temperature))
{
Console.Write("Please enter a number for the Temperature: ");
temp = Console.ReadLine();
}
Console.WriteLine("Your Temperature is " + Temperature);
Console.ReadKey(); // Debug Line that keeps console active

} //end main
} // end class Program
} // end namespace

[/code]