Question: Write a program to read several lines from a file called H12.in. For each line, check whether it is a palindrome. For each line read

Write a program to read several lines from a file called H12.in. For each line, check whether it is a palindrome. For each line read from the file, print only the lines that are palindromes. Recall that a palindrome is a string that is the same backwards and forwards, ignoring spaces and punctuation. Some example palindromes are radar and I, Madam, I made radio. So I dared! Am I mad? Am I?? You may use theremoveWS method from Lab 14. Your palindrome checking method must be recursive.

Write a program to read several lines from a file called H12.in. For each line, check whether it is a palindrome. For each line read from the file, print only the lines that are palindromes. Recall that a palindrome is a string that is the same backwards and forwards, ignoring spaces and punctuation. Some example palindromes are radar and I, Madam, I made radio. So I dared! Am I mad? Am I?? You may use theremoveWS method from Lab 14. Your palindrome checking method must be recursive.

Write a program to read several lines from a file called H12.in. For each line, check whether it is a palindrome. For each line read from the file, print only the lines that are palindromes. Recall that a palindrome is a string that is the same backwards and forwards, ignoring spaces and punctuation. Some example palindromes are radar and I, Madam, I made radio. So I dared! Am I mad? Am I?? You may use theremoveWS method from Lab 14. Your palindrome checking method must be recursive.

H12.in:

Write a program to read several lines from a file called H12.in.

H12 in History Source 1 You must be the change you want to see in the world 2 Sore was I, ere I saw Eros. 3 A man, a plan, a canal Panama 4 Never a foot too far even. 5 BORROW OR ROB? 6 Euston saw I was not Sue 7 THIS IS JUST A TEST 8 Stop nine myriad murmur Put up rum, rum, dairymen in pots 9 Live on evasions No I save no evil. 10 Red Roses run no risk, sir, on nurses order. 11 The best way out is always through. 12 Salisbury moor sir, is roomy. Rub Silas. 13 Bob Did Anna peep? Anna Did Bob? 14 banana 15 Marge let's went I await news telegram. 16 The secret to life is meaningless unless you discover it yourself 17 Egad Loretta has Adams as mad as a hatter 0ld age 18 Great spirits have always encountered violent opposition from mediocre minds. 19 Eve, mad Adam Eve 20 21 Resume so pacific a pose muser. 22 Marge let a moody baby doom a telegram. 23 Tenet 'C' is a basis a basic tenet 24 sis 25 Neua s simple hymn: "I attain my help, Miss Allen 26 Do not wait to strike till the iron is hot; but make it hot by striking 27 Straw? No, too stupid a fad I put soot on warts 28 Sir I demand I am a maid named Iris 29 TOO HOT TOO H00T 30 31 32

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!