Once the user enters string of text, I start with counting no. of sentences. Here is a pseudocode:
//To count no. of sentences in a string of text//
int noofsentences = 0;
Start from the beginning of file (or string of text);
If . or ! or ?
noofsentences = noofsentences + 1;
till EOF (end of text);
I know the above pseudocode is too elementary and might even not be without faults. Still seeking opinion if this is the way a programmer approaches. Is my approach to Readability lab needs any correctional advise.
string enterword = get_string("input");
int t = strlen(enterword);
Once the user enters string (enterword), do I need to create an array that will store all the characters (or string of text) entered by the user or array is already created when the user enters string input?