Update main.c

line31: added "&&" operator
line34: changed "if" to "elseif"
line37: changed "if" to "else"