Question: In C, you will write a program that will do the following: prompt the user to enter characters from the keyboard, you will read the
In C, you will write a program that will do the following: prompt the user to enter characters from the keyboard, you will read the characters until reading the letter 'Q' You will compute statistics concerning the type of charcaters enters. In this lab we will use a while loop. We will read characters from stdin until we read the character 'Q'
The 'Q' should be included when computing the statistics properties of the input. Since characters are integers you will determine the average character (average when one looks at the character as an integer (its ASCII value). To achieve this you will need to compute the some of the ASCII values of the characters.
We are intrested in determing the following statistics
1. The number of uppercase alphabetical characters
2. The number of odd digits '1', '3', '5', '7', '9'
3. The total number of characters inputted
4. The number of line feeds (ASCII value of 10)
5. The average character ( here we treat the chcaracters as an integer based on their ASCII values)
6. The average character that is read (include the 'Q')
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
