using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
public const int N = 10;
static void Main(string[] args)
{
char[] word = Console.ReadLine().ToCharArray();
int i = 0, j = 0;
Console.WriteLine(word);
while ((word[i] >= 'a' && word[i] <= 'z') || (word[i] >= 'A' && word[i] <= 'Z'))
{
j++;
i++;
}
Console.WriteLine(+j);
Console.ReadLine();
}
}
}
Every time I try to debug, the debbuger tells me "IndexOutOfRangeException was unhandled" and I don't know the reason why.