+ 2
Code Coach it’s a sign fails test case 5
My code passes every test i throw at it but fails the hidden test case 5. After re-reading the instructions I noticed that the program supposedly also needs to test for phrases in addition to words. I then modified my scanf() to receive strings that include spaces. The rest of my code should have no problem processing the longer strings. Instead of solving the issue I then failed hidden test case 3 as well. I’m stumped. Any insight is appreciated. https://code.sololearn.com/cOa3RbaZ42Wy/?ref=app
4 ответов
+ 2
Addendum: I just caught the fact that single character words like I and a are not palindromes so i modified my code to exclude them. The code still fails test case 5.
+ 2
Wait... && l < 1?
+ 2
oops typo in my posted code. my solution reads && l > 1. good catch. That was my approach to remove “I” and “A” from the palindrome count. no effect on the outcome though.
+ 2
I was able to accept strings with spaces on multiple lines utilizing %[^\n]%*c in the scanf. this resolved test case 3 failing but im still stumped on test case 5.