-1
Ides just show it to you, probably him it’s not what you think. The compiler understands the code and generates something that will be executed or not. Then there is nothing wrong with the code. What Ides do is guide when he sees something that is weird and shouldn’t be there. It is the case of these three lines that don’t need to exist. Since 5 is never greater than 6 the condition will always be false and the content of if
will never be executed, so all three lines are innocuous and should be removed from the code. Even if it was always true there the if
could be eliminated, leaving only direct increment without conditional.
As a consequence in this case you will never get probation when you run it, it is a clear false condition and the IDE has already informed you so that you do not waste time with this code
5 is never greater than 6. The condition will never be true. Therefore it should never enter into the conditional.
– Piovezan
Your code has other strange things. For example, on line 39 you are doing an assignment that will always return true, within the
if
.– Gabriel