Welcome to CS 106B/X Random Writer ('N-Grams')! This program generates random text based on a document. Give me an input file and an 'N' value for groups of words, and I will generate random text for you. Input file name: badfile Unable to open that file. Try again. Input file name: notfound.txt Unable to open that file. Try again. Input file name: hamlet.txt Value of N: 0 N must be 2 or greater. Value of N: -4 N must be 2 or greater. Value of N: aoeu Illegal numeric format Value of N: 4 # of random words to generate (0 to quit): xyz Illegal numeric format # of random words to generate (0 to quit): 2 Must be at least 4 words. # of random words to generate (0 to quit): 40 ... lust, though to a radiant angel link'd, Will sate itself in a celestial bed And prey on garbage. But soft! methinks I scent the morning air. Brief let me be. Sleeping within my orchard, My custom always of the afternoon, ... # of random words to generate (0 to quit): 20 ... much land, and fertile. Let a beast be lord of beasts, and his crib shall stand at the king's mess. ... # of random words to generate (0 to quit): 0 Exiting.