c programming if else exercise