Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alphabet_vector[26] = {0}
- most_common_char_counter = 0
- for (input_counter = 0; input_conuter < 20; input_conuter++)
- {
- c = getchar()
- alphabet_vector[c - 'a']++
- if (alphabet_vector[c - 'a'] > most_common_char_count)
- {
- most_common_char_count = alphabet_vector[c - 'a']
- most_common_char = c
- }
- }
- print most common char is most_common_char
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement