#include #include int main(int argc, char** argv) { if(argc < 2) { std::cout << "Usage: " << argv[0] << " " << std::endl; return 0; } char* ciphertext = argv[1]; std::map letters; for(int i = 0; ciphertext[i] != 0; ++i) { if(letters.contains(ciphertext[i])) { letters[ciphertext[i]]++; } else { letters[ciphertext[i]] = 1; } } for(auto& [key, value] : letters) { std::cout << key << ": " << value << std::endl; } return 0; }