练习题:从键盘上输入一篇英文文章。文章的实际长度随输入变化,最长有10行,每行80个字符。要求分别统计其中的英文字母、数字、空格和其他字符的个数(提示:用一个二维字符数组存储文章)

下列代码是本人所写,其中有许多错误,刚学C++一个多月,请见谅。不太清楚,望指教,谢谢

#include<iostream>
#include<string.h>
using namespace std;

int main()
{
    char str[11][81];
    int num = 0, let = 0, spa = 0, els = 0, a, b;
    cin >> str[10][80];
    for (int i = 0;i < 11;i++)
    {
        b = strlen(str[i]);
        for (int j = 0;j <= b;j++)
        {

            a = str[i][j];
            if ((a <= 90 && a >= 41) || (a >= 97 && a <= 122) || (a <= 57 && a >= 48) || (a == 32))
            {
                if ((a <= 90 && a >= 41) || (a >= 97 && a <= 122))
                    let += 1;
                else {}
                if (a <= 57 && a >= 48)
                    num += 1;
                else {}
                if (a == 32)
                    spa += 1;
                else {}
            }
            else
                els += 1;
        }

    }
    cout << let << endl;
    cout << num << endl;
    cout << spa << endl;
    cout << els << endl;
}