In Java, if we want to read an user input from the console, we can do the following.
Scanner scn = new Scanner (System.in);
int x;
x = scn.nextInt(); //Receive
Yes, you need to use ReadLine, parsing the input is not so hard.Just use TryParse method:
int input;
bool isValid = int.TryParse(Console.ReadLine(),out input);
if(isValid)
{
...
}
Console.Read
reads the next character from console, and it returns the ASCII
code of the char, that's why you are getting 55
instead of 7
.