#include <stdio.h>
#include <ctype.h>
int main() {
char str[105];
// 입력받을게 없을떄까지 반복 한줄씩 입력받음
while(fgets(str,sizeof(str),stdin)!=NULL) {
int s=0,l=0,num=0,space=0;
for(int i=0; str[i]; i++) {
if(islower(str[i])) s++;
if(isupper(str[i])) l++;
if(isdigit(str[i])) num++;
if(str[i]==' ') space++;
}
printf("%d %d %d %d\n", s, l, num, space);
}
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: