#include <stdio.h> #include <string.h> int main() { char str[100]; int i, a = 0, b = 0; gets(str); for (i = 0; i < strlen(str); i++) { if (str[i] >= 'a' && str[i] <= 'z') a++; if (str[i] >= 'A' && str[i] <= 'Z') b++; } printf("大写字母%d个,小写字母%d个", b, a); return 0; }
by: 发表于:2018-05-25 16:04:28 顶(0) | 踩(0) 回复
??
回复评论