- #1
stonecoldgen
- 109
- 0
Hi, so I have this code:
The console is always writing the line "false" even if I input a number that should return "true."
any idea what am I doing wrong?
Code:
namespace Program1
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Is the numer less than 10?");
int numero = Console.Read();
if (numero < 10)
{
Console.WriteLine("true");
}
else
{
Console.WriteLine("false");
}
}
}
}
The console is always writing the line "false" even if I input a number that should return "true."
any idea what am I doing wrong?