본문 바로가기

조건문

(1)
[c언어]switch문 / switch-case문 c언어에서 조건문하면 빼놓을 수 없는 switch문(switch-case문) 입니다 1. switch문 표현법 2. switch문 예제 MDSN에 표기된 switch문의 표현법은 다음과 같습니다. switch ( expression ) { // declarations // . . . case constant_expression: // statements executed if the expression equals the // value of this constant_expression break; default: // statements executed if expression does not equal // any case constant_expression } switch(조건에 대입할 값) { ca..