With the code below, when I write what the input is to the console, it returns 54
if I enter 6
. I'm not sure why this is happening, and I would like to know.
namespace VariablePractice
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello, World.");
int input = Convert.ToInt32(Console.Read());
Console.WriteLine("You entered: " + input);
Console.ReadKey();
}
}
}