求教 Debug Error
#include<stdio.h>#include<string.h>
void main()
{ int i=0,dx,xx,sz,kg,qt;
char *p,str[80];
dx=0,xx=0,sz=0,kg=0,qt=0;
printf("input str shi:\n");
while((str[i]=getchar())!='\n') i++;
p=&str[0];
while(*p!='\n')
{
if((*p<='z')&&('a'<=*p))
++xx;
else if((*p<='Z')&&('A'<=*p))
++dx;
else if((*p<='9')&&('0'<=*p))
++sz;
else if(*p==' ')
++kg;
else ++qt;
p++;
}
printf("\ndx shi %d ge.\nxx shi %d ge.\nsz shi %d ge.\nkg shi % ge.\nqt shi %d ge.\n",dx,xx,sz,kg,qt);
}