void countCapitalWord() { ifstream fin(“NOTES.TXT”); char word[25]; int count=0; while(!fin.eof()) { fin>>word; if (isupper(word[0])) count++; } fin.close(); cout<<"There are "<<count<<" words in file which starts with Capital Letter"; } void main() { countCapitalWord(); }
No comments
Post your comments