Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Having trouble with reading words from A txt file. Theres words that contain apostrophes and its throwing my word count off. How do I correct

Having trouble with reading words from
A txt file. Theres words that contain apostrophes and its throwing my word count off. How do I correct it? Do I use isalnum? Also need help total occurrence of letter e and total number of words with two occurrence of the letter e.
image text in transcribed
int count end e e 30 31 32 int count ate 05 int count_vowel -05 int count occ e -05 int count 2occ e 0; 34 35 36 37 bool isNotAlum-true; While(!input.eot()) //dont know how many words ? 38 39 40 41 42 43 input >word; //every time you grab a word count word++ if (word. length()--6) //check current word is 45 46 47 48 49 50 51 52 53 54 count 6letter++ if(word[el--'T' ) if (word [word. length ( )-1Jr-' e ' ) if (word. find( "ate") i=-1) count beginT++j count end e+ countlate+t; if (word.find first_of ( "aeiou",e)--e) 56 count_ voweltt int count end e e 30 31 32 int count ate 05 int count_vowel -05 int count occ e -05 int count 2occ e 0; 34 35 36 37 bool isNotAlum-true; While(!input.eot()) //dont know how many words ? 38 39 40 41 42 43 input >word; //every time you grab a word count word++ if (word. length()--6) //check current word is 45 46 47 48 49 50 51 52 53 54 count 6letter++ if(word[el--'T' ) if (word [word. length ( )-1Jr-' e ' ) if (word. find( "ate") i=-1) count beginT++j count end e+ countlate+t; if (word.find first_of ( "aeiou",e)--e) 56 count_ voweltt

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

Essential SQLAlchemy Mapping Python To Databases

Authors: Myers, Jason Myers

2nd Edition

1491916567, 9781491916568

More Books

Students also viewed these Databases questions