Fast rewards. I will rate 5 stars for those who answer it correctly and efficien
ID: 3532464 • Letter: F
Question
Fast rewards. I will rate 5 stars for those who answer it correctly and efficiently.
C PROGRAMMING ONLY-NO JAVA OR C++ CODES PLEASE.
Problem #1:
Write an application that analyzes a line of text. Count the instance of the following categories of symbols:
Uppercase letters
Lowercase letters
Digits
Periods, exclamation points or questions marks
Commas, semicolons and colons
Blanks
All other symbols
This application will prompt the user to enter a line of text. You are to continue prompting the user until the user want to quit. For each line you are to count the instances of the categories listed above. You are to print the count of each category in a nice format.
Algorithm:
Declaration
Loop over next line
Loop over each char in line
With an if statement determine which category [see ASCII table]
if ( (int) char >=65 && (int) char <=90)
category => uppercase
Use category in a switch statement to count each instance
Print output
Explanation / Answer
Enjoy!
http://ideone.com/uLuQn7
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.