Can anyone tell me what's wrong with this code?
using System;
using System.IO;
class Program
{
static void Main()
{
StreamReader sr = new StreamReader(Console.OpenStandardInput());
string str = sr.ReadToEnd();
int numb = 0, result = 0, len = str.Length;
for (int i = 0; i < len; i++)
{
if (str[i] >= '0' && str[i] <= '9')
numb = numb * 10 + (str[i] - 48);
else if (str[i] == '\r')
{
result += numb;
numb = 0;
}
}
Console.WriteLine(result.ToString());
}
}