Hello there,
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.
badchick
0
Newbie Poster
Recommended Answers
Jump to Postmake 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
peter_budo
2,532
Code tags enforcer
Team Colleague
Featured Poster
cyber_aziz
0
Newbie Poster
zyruz
0
Junior Poster in Training
freemind
0
Junior Poster in Training
ivanCeras
0
Newbie Poster
SpS
34
Posting Pro
Dave Sinkula
2,398
long time no c
Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.