CodePudding user response:
# include & lt; Iostream># include & lt; Cstring>
using namespace std;
Int main ()
{
Int I, j, k;
Int the lett [26]={0};
Char s [60];
cout<" The input string: "& lt;
cout<" The number of letters statistical results as follows: "& lt;
{if (s [I] & gt;='a' & amp; & S [I] <='z')
Lett [s [I] - 'a'] + +;
Else if (s [I] & gt;='A' & amp; & S [I] <='Z')
Lett [s [I] - 'A'] + +;
cout
for(k=0; K<26. K++)
{
Char d='A' + k;
cout
cout
return 0;
CodePudding user response:
Reference:# include & lt; Iostream>
# include & lt; Cstring>
using namespace std;
Int main ()
{
Int I, j, k;
Int lett_l [26]={0};//lowercase
Int lett_c [26]={0};//caps
Char s [60];
cout<" The input string: "& lt;Cin> s;//gets (s);//enter
J=strlen (s);//the length of the string
cout<" The number of letters statistical results as follows: "& lt;for (i=0; i {
If (s [I] & gt;='a' & amp; & S [I] <='z')
Lett_l [s [I] - 'a'] + +;
The else
If (s [I] & gt;='A' & amp; & S [I] <='Z')
Lett_c [s [I] - 'A'] + +;
//cout//cout }
for(k=0; K<26. K++)
{
Char d='A' + k;
Char l='a' + k;
If (lett_c [k]!=0 | | lett_l [k]!=0) {
cout//if ((k + 1) % 10==0)
//cout}
}
return 0;
}
CodePudding user response:
That excuse me what is the program mistakesCodePudding user response: