Code works, output is wrong. Introducing the suggested input data grandfather, grandmother etc... results as grandmother being the longest.Hi, the program works fine, no errors, however, the output is wrong and I can't figure out why exactly.
However, I have noticed two strange things when testing.
1 - If I input b, c, a and other longer strings, the results will display "a" as being the first shortest, even though it is the third.
2