Home > Back-end >  Comrades, I can write a statistical number of code strings letters, but the operation is not success
Comrades, I can write a statistical number of code strings letters, but the operation is not success

Time:11-13




#include
#include
#include
Int charnum (int n, char * a);
Char * gets STR (char *);
Int main ()
{
Int I, n;
N=0;
Char STR [10000].
Gets (STR);
N=strlen (STR);
Char * a=(char *) malloc (n * sizeof (char));
Charnum (n, STR);
return 0;
}
Int charnum int n, char * (a)
{
Int I, c;
c=0;
for(i=0; i{
If ((a [I] & gt;='a' & amp; & A [I] <='z' | | a [I] & gt;='A' & amp; & A [I] <='Z'))
{
C + +;
}
Else if (a [I]='\ 0') {
break;
}
The else {
continue;
}
}
Printf (" % d \ n ", c);
}

CodePudding user response:

No one? Online urgent!

CodePudding user response:

Char * gets STR (char *);//remove this line, without having to declare the function, or repeat a statement

CodePudding user response:

refer to the second floor qybao response:
char * gets STR (char *);//remove this line, without having to declare the function, or repeat a statement

Ok, I will try