switch(n){case 1:
コード・ブロック 1 の実行
break case 2:
コード・ブロック 2 の実行
breakdefault:
n が case1 でも case2 でもない場合に実行するコード
}