Write a program that finds rhyming words in a poem.
specifically, the program reads an input file, line by line, and extracts the last word in each line. it then compares this last word with the last word from the line after it. if it finds that the 2 words "rhyme" (which is simply defined as the 2 words that are being compared share the same 2 last letters), then it prints out these two words to standard output (i. e. the display).
but first, the words must be cleaned up of any non-alphabetical characters (usually this means puncuation, since many poems have their last lines often end with a comma, a semicolon, a question-mark, etc…) so if the last word on a line has punctuation marks on it, e. g. "hello? ! ", it becomes "hello". or if the last word is "don’t", it becomes "dont".
finally, the program has to state how many rhyming pairs it found, or if it did not find any at all.
the program has to ask the user for the file name and has to check to see if the file exists (use the string "enter file name: " for the question). if it does not exist, the program must output (via cerr) an error message: "input file opening failed." and then exit with code 1.
your program should define at least one function. if your program does not have at least one function, you will not get credit for this part of the assignment, even if your program passes submit. cs grading. and remember that you can only use programming techniques and instructions that we have covered in class so far.
i think the answer is newspaper editor
step by step explanation:
we can define a a short circuit as a simple low resistance connection between the two conductors supplying electrical power to any circuit. whereas open circuit can be defined as an electric circuit that has been broken, so that there is no complete path for current flow. a short circuit can be defined as a circuit where the voltage tends to zero and current tends to infinity.
maya st. germain
they can study what the video game consoles are made up of and how they work so that way the can implement them into their work.
specifically, the program reads an input...