Write a program which reads a long text from the user as lines until the user puts a dot (.) in the end. Then the program should print the most frequent letter in the text (which repeats more than the others).
Note that the space character is not a letter.
Assumptions:
- Always one of the letters will have more frequency than the others.
- User will enter only lower-case characters of english alphabet and put exactly one space between any two words and not put any spaces at the end of each line.
- The text will be shorter than 1000 characters, and there will be no punctuation except the dot in the end (No comma, no quotes, etc..).
- The user will enter less than 100 characters for each line.
Examples:
yaz dostum
yoksul gorsen besle kaymak bal ile
garipleri giydir ipek sal ile
oksuz gorsen sar kanadin kolunu
kimse gocmez bu dunyadan mal ile.
|
a
|
ilim ilim bilmekdir
ilim kendini bilmekdir
sen kendini bilmez isen
ha bir kuru emekdir.
|
i
|
lale ile leylak.
|
l
|
Important issues about all exams/projects/quizzes:
- Update just Question.c file, not Question.txt.
- Make changes only between the following comments(DO NOT modify these comments or anything outside the region marked by the comments):
- // DO_NOT_EDIT_ANYTHING_ABOVE_THIS_LINE
- // DO_NOT_EDIT_ANYTHING_BELOW_THIS_LINE
- If you modify these comments for any reason, you can copy/paste the initial version from Question.txt into Question.c. Note that Question.txt is not graded at all, so anything you write in Question.txt will be discarded.
- To avoid getting the 'Binary Not Found' error, SAVE and BUILD your code before RUN.
- Do not add any extra messages message for input/output such as 'Enter an integer:', 'The result is:', etc. Any additional text that appears in the output will cause you to get no points from the question.
- Input and output of your program must be just like those in the Examples table above.