>>861

unsigned char test(){
  unsigned char a;
  if(...){
    a=1;
  else if(...){
    a=0;
  }
  return a;
}

と書くのが標準的なC言語での書き方。
breakしまくれば良いですよ。