the program then changes the first and last words. ( for example I am here will change to here am I)
if the user does not enter 3 words then the program ends.
an example of how it should be
please enter three words separated by one or more blanks:> you will code the new sentence is : code will you please enter three words seperated by one or more blanks:>you will Error: There are not three words in the sentence Exiting Program.. please enter three words seperated by one or more blanks:>you Error: There are not three words in the sentence Exiting Program.. please enter three words seperated by one or more blanks:>does it work the new sentence is : work does it
I was thinking of using stringtokenizer to do this, the thing is i do not know how to use stringtokenizer.
could i use split sting?
if i can then how would i?
how could i read the 3 words and store each word in an array? then print the array later?
Edited by pindo, 04 May 2011 - 05:52 AM.


Sign In
Create Account


Back to top









