Average Character
Question
Solution
Idea
The basic idea is easy, just to get the average ASCII value of each character in the input string.
However, if C is the language being used, things get a bit tricky regarding the input. Here, we can only use fgets() to read the input because white space characters cannot be ignored in this question. So, the correct way to read the input is below:
Code
https://github.com/mendax1234/Coding-Problems/blob/main/kattis/averagecharacter/averagecharacter.c
Last updated