Pig Latin fails test 3 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Pig Latin fails test 3

Hi! Why does this code fail the third test? Any suggestions? https://code.sololearn.com/c4bxX8FRfU51/?ref=app

12th Jan 2020, 4:54 PM
Evgeniy Smelov
Evgeniy Smelov - avatar
5 Answers
+ 2
Maybe take a look at this thread: https://www.sololearn.com/discuss/2105210/?ref=app
12th Jan 2020, 8:29 PM
Paul
Paul - avatar
+ 1
I used this for input: fgets(s, 120, stdin); The test is strange with length. Try with decreasing MAX.
12th Jan 2020, 6:03 PM
Paul
Paul - avatar
+ 1
I've already tried 50, 99, 100 and 120 but the result is the same.
12th Jan 2020, 6:08 PM
Evgeniy Smelov
Evgeniy Smelov - avatar
+ 1
Well... It looks stupid because so far I thought that English words consist only of letters [A-z] (without punctuation marks) but the code below passes all tests fine. Thank you, Paul. https://code.sololearn.com/cWeHd9Y8p6Up/?ref=app
12th Jan 2020, 11:07 PM
Evgeniy Smelov
Evgeniy Smelov - avatar
0
In this code I took into account the EOF signature. There is no need to create an array. https://code.sololearn.com/cqfM6xrI31TF/?ref=app
18th Jan 2020, 1:35 AM
Evgeniy Smelov
Evgeniy Smelov - avatar