You are forgetting a closing-curly-bracket-}
in line 24....to close the IF of line 23....
and concentrate on:
- the creation of the compare function
- the truth-table
- the build of the IF ELSE-IF statement structure as part of the compare FUNCTION-BODY
- the execution of the compare function (keeping in mind that the return statement is used )