0

C# Code Coach - Missing a case, what looks wrong?

https://code.sololearn.com/cH5DQoH34r82/?ref=app The purpose is to "interpret" given input into Pig Latin - move the first letter to the end of each word & add 'ay', so "example text" becomes "xampleeay exttay" (IIRC). On the surface my code seems correct, and passes cases 1, 2, 3, & 5, but fails 4, which is hidden. Anything look wrong in the code?

12th Jul 2020, 4:18 AM
Scott C
Scott C - avatar
2 Respostas
+ 6
Scott C Remove if else condition in second foreach loop. Just write Console.Write(pig + " "); Works fine.
12th Jul 2020, 5:00 AM
A͢J
A͢J - avatar
+ 2
Thanks
12th Jul 2020, 7:05 AM
Scott C
Scott C - avatar