Hello, I'm very much a newbie in C++; I'm following a course online and the current exercise is to make a console app that compares the length of two words and prints out which is the longer of the two.
Where I'm going wrong is with the if statements, when I compile (and run) the code after typing "cat" (3 chars) as the first word and "elephant" (8 characters) as the second, it proceeds to print out all the if statements as if it were true for all i.e. prints all three of them.
I feel like I'm just overlooking something incredibly simple but I've spent close to two hours just looking at the code but I'm failing to see where I'm going wrong.