#include <stdio.h>
#include <string.h>

int main(){
    char str[100];
    int count[256] = {0};

    printf("Enter a string : ");
    fgets(str, sizeof(str), stdin);

    for (int i=0 ;i<strlen(str); i++)
        count[str[i]]++;
    for (int i=0 ;i<256; i++)
        if (count[i] > 0) 
            printf("'%c' appears %d times.\n",  i,  count[i]);
}