So i am currnently trying to get into programming with C# with absolutely no expierience whatsoever. So i tried making a simple program that reads user input and outputs it again to the user. Now the name part is all fine, but when i try to input my age as for ex. 20 y/o, it always writes "Your input has been saved. You are 49 Year(s) old." Whatever number i put in, it always gives me 49, and i can't see any problem in the code that would cause this. Do you know what's wrong?
Console.Write("Insert Age: ");
int age = Convert.ToInt32(Console.Read());
if (age < 18)
{
Console.WriteLine("Whoops! Looks like you are only " + age + " Year(s) old! You are too young to have your input saved.");
}
else
{
Console.WriteLine("Your input has been saved. You are " + age + " Year(s) old.");
}