#include <stdio.h>
void histogram(char *);
int main() {
char str[50];
printf("\n\tDigite uma frase: "); histogram(str);
}
void histogram(char *frase) {
int num=0, num2=0, az=0;
char alfabeto[]="abcdefghijklmnopqrstuvwxyzçABCDEFGHIJKLMNOPQRSTUVWXYZÇ";
for(num = 0; frase[num] != 0; num++) {
for (num2 = 0; alfabeto[num2] != '\0'; ++num2){
if (frase[num] == alfabeto[num2]){
az++;
break;
}
}
}
printf("\n\n\tTemons %d letras\n\n", az
); }
I2luY2x1ZGUgPHN0ZGlvLmg+Cgp2b2lkIGhpc3RvZ3JhbShjaGFyICopOwoKaW50IG1haW4oKSB7CgljaGFyIHN0cls1MF07CgoJcHJpbnRmKCJcblx0RGlnaXRlIHVtYSBmcmFzZTogIik7CglmZ2V0cyhzdHIsNTAsc3RkaW4pOwoJaGlzdG9ncmFtKHN0cik7Cgp9Cgp2b2lkIGhpc3RvZ3JhbShjaGFyICpmcmFzZSkgewoJaW50IG51bT0wLCBudW0yPTAsIGF6PTA7CgljaGFyIGFsZmFiZXRvW109ImFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6w6dBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWsOHIjsKCglmb3IobnVtID0gMDsgZnJhc2VbbnVtXSAhPSAwOyBudW0rKykgewogICAgICAgIGZvciAobnVtMiA9IDA7IGFsZmFiZXRvW251bTJdICE9ICdcMCc7ICsrbnVtMil7CiAgICAgICAgICAgIGlmIChmcmFzZVtudW1dID09IGFsZmFiZXRvW251bTJdKXsKICAgICAgICAgICAgICAgIGF6Kys7CiAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgfQogICAgICAgIH0KCX0KCglwcmludGYoIlxuXG5cdFRlbW9ucyAlZCBsZXRyYXNcblxuIiwgYXopOwp9Cg==