subject

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.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 29.01.2019 00:04
When is a chart legend used a. all the time b. whenever you are comparing data that is the same c. whenever you are comparing multiple sets of data d. only for hand-drawn charts
Answers: 2
question
Computers and Technology, 28.01.2019 16:50
Which of the following tasks is an audio technician most likely to perform while working on a nature documentary? (select all that apply). eliminating potentially distracting background noise adding sound effects making sure the lighting is adequate for a particular scene changing the narration to better match the mood of the documentary
Answers: 3
question
Computers and Technology, 23.01.2019 21:35
Time management is the process of planning your activities to gain better control over how you spend your time?
Answers: 2
question
Computers and Technology, 12.01.2019 21:13
Need five questions ! take your time~question 1 excel is a tool used to a create a spreadsheet b design a brochure c make a presentation d write a letter question 2 a cell on an excel spreadsheet refers to a a type of document view b a page of the workbook c the rectangular box where a column and row intersect d the data in a worksheet question 3 tanya is entering the amount of money she has earned from babysitting onto an excel spreadsheet, but the autocomplete feature is not working. why? a autocomplete must be turned on before every entry. b autocomplete only works with professional spreadsheets. c autocomplete does not recognize types of currency. d autocomplete only works when the first character is text. question 4 which tab has formatting features to change the font style, color, size, and alignment? a file b home c insert d view question 5 brad uses excel to create a weekly schedule. he wants to keep using the same spreadsheet every year. one of his rows is titled "baseball," but the season has ended until next year. what is the most efficient way to modify the spreadsheet, so brad does not see baseball on his schedule but can easily get it back when the season starts again? a add a new comment with the start date of the next season b hide the row and unhide it when the new season begins c highlight the row in a different color to show the season has ended d start a new spreadsheet
Answers: 1
You know the right answer?
Write a program that finds rhyming words in a poem.
specifically, the program reads an input...
Questions
question
Mathematics, 08.03.2017 00:25
question
World Languages, 18.04.2019 23:57
Questions on the website: 6580716