#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#define letterAmount 8
int main(int argc, char *argv[])
{
unsigned int uppercaseAlpha = 0, lowercaseAlpha = 0, digit = 0;
for(unsigned char count = 1; count<=letterAmount;)
{
int c = getc(stdin);
if(isupper(c))
uppercaseAlpha++;
else if(islower(c))
lowercaseAlpha++;
else if(isdigit(c))
digit++;
else
continue;
count++;
}
fwprintf(stdout, L"uppercaseAlpha %u", uppercaseAlpha);
fwprintf(stdout, L"lowercaseAlpha %u", lowercaseAlpha);
fwprintf(stdout, L"digit: %u", digit);
system("pause");
return EXIT_SUCCESS;
}
追问刚学还看不懂...看你打的这么辛苦就采纳了吧……