// 대문자 개수, 소문자 개수, 숫자합, 나머지 문자 개수합 출력 *나올때까지 (*는 세지 않음)
#include <stdio.h>

int main() {
    int count1 = 0;
    int count2 = 0;
    int sum = 0;
    int count3 = 0;
    char ch;
    while (1) {
        scanf("%c", &ch);

        if (ch == '*') {
            break;
        }
        if (ch >= 'A' && ch <= 'Z') {
            count1++;
        }
        else if (ch >= 'a' && ch <= 'z') {
            count2++;
        }

        else if (ch >= '1' && ch <= '9'){
            sum += (ch - '0');
        } 
        else {
            count3++;
        }
    }
    printf("%d %d %d %d", count1, count2, sum, count3);
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: