Update testcode.c

if and else statements added