Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This code is for c Lab 6 (this is to be turned in) You will write a program that will do the following: prompt the

This code is for c
image text in transcribed
Lab 6 (this is to be turned in) You will write a program that will do the following: prompt the user enter characters from the keyboard, you will read the characters until reading the letter ' Q ' You will compute statistics concerning the type of characters entered. In this lab we will use a while loop. We will read characters from stdin using getchar0 umtil we read the character ' Q ' Example imput mJ05/7+x1@3qcxQ 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 imeger (its ASCM value). To achieve this you will need to compute the sum of the ASCII values of the characters. We are interested in determining the following statistics 1. The mumber of uppercase alphabetical characters 2. The mumber of odd digits ' 1:3:3;7:9 ' 3. The total mamber of characters inputted 4. The mumber of line feeds (ASCII value of 10 ) 5. The merage character (here we treat the characters as an integer based on their ASCII values) 6. The avernge chanacter that is read (don't include the ' Q ')

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Business Process Driven Database Design With Oracle PL SQL

Authors: Rajeev Kaula

1st Edition

1795532386, 978-1795532389

More Books

Students also viewed these Databases questions