Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Loop stuff

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi,

I have written a code according to the instructions given. I know i havent done it correctly so i will really appreciate if someone would help me with my code.

- If end-of-file in the input file, set the sentence to period only.
- Otherwise
a) Loop while not end-of-file and the last character of the current word is not one of the punctuation [period, exclamation point, or question mark]
· Input the next word from the input file.
· If sufficient characters within the sentence for next word, then append the next word to the sentence.


int sentence =0;

do
{

if ((sentence=='.') || (sentence'!') || (sentence'?'));

int x=strlen(size)-1;

}
while (sentence! ='\n')
 
Hello, I don't know if this is your problem but I'll try... if ((sentence=='.')||(sentence=='!')||(sentence=='?'));
I think you had to declare the == signs...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top