Untitled

mail@pastecode.io avatar
unknown
c_cpp
a month ago
263 B
1
Indexable
Never
#include <iostream>
#include <string>


void count(std::string word) {
	for (auto i : word) {
		std::cout << i << " : " << std::count(word.begin(), word.end(), i) << '\n';
	}
}

int main() {
	std::string word;
	std::cin >> word;
	count(word);

};
Leave a Comment