"non-words should be output exactly as they appear in the input" & A word is defined as "a consecutive sequence of letters",
Simply, the previous line contains the tricks of this problem,
any character outside the range 'a'-'z' or the range 'A'-'Z' is a non-word,
manipulate words only

,
and here is some critical inputs/outpus 4 u,
input:
Code: Select all
This is the input.
He is a boy.
Object123oriented,..,.Programming
000000000
aaaaaaaaaaaa
Aaaaaaaaaaaa
computerprogrammingII
cse-1204 Computer programming II
ACM programming contest was held on 10th November, 2001 at BUET.
an a eye An A Eye Bee BEE Dhaka-1205 1st last.
output:
Code: Select all
hisTay isay hetay inputay.
eHay isay aay oybay.
Objectay123orienteday,..,.rogrammingPay
000000000
aaaaaaaaaaaaay
Aaaaaaaaaaaaay
omputerprogrammingIIcay
secay-1204 omputerCay rogrammingpay IIay
ACMay rogrammingpay ontestcay asway eldhay onay 10htay ovemberNay, 2001 atay UETBay.
anay aay eyeay Anay Aay Eyeay eeBay EEBay hakaDay-1205 1tsay astlay.
C++ Is The Best.