Coded the if

Coded the if statements.