#include<iostream>

#include<cctype>

#include<string>

using namespace std;

int main() {

string s = "i am man";

int count[26] = { 0 };

unsigned ch;

for (int i = 0; i < s.length(); i++) {

if (ch = toupper(s[i]) - 'A' < 26);

count[ch]++;

}

for (int i = 0; i < 26; i++){

cout << (char)(i + 'A') << count[i] << '\t';

for (int j = 0; j < count[i]; j++)

cout << "*";

cout << endl;

}

return 0;

}
영문장 알파벳 갯수 나열할려는데 뭐가 틀린건가요