Reading an integer from user input

You can convert the string to integer using Convert.ToInt32() function

int intTemp = Convert.ToInt32(Console.ReadLine());

Leave a Comment