# include & lt; bits/stdc++.h>
#include
using namespace std;
Int main ()
{
String s;
While (getline (cin, s))
{
Int a [5]={0};
Int x=s.l ength (), b;
For (int I=0; i
If (s [I]!='\ 0') {
If (s [I] & gt;='A' & amp; & S [I] If (s [I] & gt;='a' & amp; & S [I] <='z') a + [1]=1;//lowercase
If (s [I] & gt;='0' & amp; & S [I] If (s==[I] '| | s [I]==' \ t ') a [3] +=1;//space
Else a [4] +=1;//other
}
}
Printf (" % d % d % d % d % d \ n ", a [0], a [1], a [2], a [3], a [4]);
}
return 0;
}
CodePudding user response:
Because more statistics, from the beginning of the second if in front of each if add an else, won't make a mistake