Question: the file words.txt have various random words while the files Gettysburg and BriarRose are long strings with no blank spaces! this is file Gettysburg this


Write a program that reads a line of text from the standard input and prints out the input string but with blanks inserted so that the output is a sequence of English words. Take "English words to mean words in the file words.txt on Canvas and Vocareum. The input is a string of lower-case letters (no punctuation or blanks). The output is the same string but with blanks inserted so that each string delimited by the blanks is a word in words.txt. If it is not possible to produce such a string, your program should print ont "null". Name your program RestoreBlanks and upload it to Vocareum. For example, if the input is: theedgeof knowledge then a correct output is the edge of knowledge If there is more than one correct output, then your program should print only one. For example, if the input is: "ormany" then your program could print out "for many" or "form any" (not both). The output does not need to make sense. For example, if the input is "butthough, then one correct output is "but though". Another correct output is "butt ho ugh" (these are in words.txt). Two sample input files, Gettysburg and Briar Rose, are on Canvas and Vocareum. Your program should be able to process either of those in under 5 seconds for full credit. fourscoreandsevenyearsagoourfathersbrought forthonthiscontinentanewnationc onceivedinlibertyanddedicatedtothepropositionthatallmenarecreatedequalnow weareengagedinagreatcivilwartestingwhetherthatnationoranynationsoconceive dandsodedicatedcanlongendure kingandqueenonceuponatimereignedinacountryagreatwayoffwheretherewereinth osedaysfairiesnowthiskingandqueenhadplentyofmoneyandplentyoffineclothesto wearandplentyofgoodthingstoeatanddrinkandacoachtorideoutineverydaybutthou ghtheyhadbeenmarriedmanyyearstheyhadnochildrenandthisgrievedthemverymuchi ndeed a aa aah aahed aahing aahs aal aalii aaliis aals aardvark aardvarks aardwolf aardwolves aas aasvogel aasvogels aba abaca abacas abaci aback abacus abacuses abaft abaka abakas abalone
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
