Okay well i have tried to do this program but i'm just not sure if i'm going in the right direction. Well i have to create a text file (Did that) which is inputed into the program, and the program has to count the instances of the following categories of symbols. such as Uppercase and lower case letters, digits, End of sentence markers like periods, question marks, and explanation points, also commas, semicolons, and colons, and Blanks. Okay well i have written some code and i used a switch statement in my processing. but the thing is, i'm not sure if i'm doing it right. And after all these satistics, i have to use them to approximate the average word and sentence length.I need another's help on this if you would, i'd be greatful for your help or for anything. Well happy holidays and thanks for your time.
Jump to Post
make a seperate counter for each instance
read the file 1 character at a time
for the upperccase and lowercase you can use the functions isupper and islower and whenever the return is 1 incriment the respective counters as for the other instances, use the ascii values of the characters
All 7 Replies
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.