刚入门C语言,想请教下大家,谢谢了
编写一个程序,要求用户输入以句号结尾的句子,并打印出每个字符在句子中出现的次数,仅限于出现至少一次的字符。一个字母的大小写版本应该算在同一个字母上。
程序的功能需要达到下面的效果(下面冒号后面的句子由用户输入):
Enter a sentence (end by ‘.’): This is a short sentence.
Occurrences of ‘a’: 1
Occurrences of ‘c’: 1
Occurrences of ‘e’: 3
Occurrences of ‘h’: 2
Occurrences of ‘i’: 2
Occurrences of ‘n’: 2
Occurrences of ‘o’: 1
Occurrences of ‘r’: 1
Occurrences of ‘s’: 4
Occurrences of ‘t’: 3