Conditional Statements in C - Hacker Rank Solution