034. 조건 선택문 이해하기(switch~case~default)034. 조건 선택문 이해하기(switch~case~default)
Posted at 2010. 11. 13. 23:29 | Posted in Computer/초보자를 위한 C 언어 300제#include <stdio.h> main() { int i = 5; switch( i ) { case 1: printf( "i는 1입니다." ); break; case 2: printf( "i는 2입니다." ); break; default: printf( "i는 %d입니다.",i ); break; } }
'Computer > 초보자를 위한 C 언어 300제' 카테고리의 다른 글
036. 조건 순환문 이해하기 2(do~while~continue~break) (0) | 2010.11.13 |
---|---|
035. 조건 순환문 이해하기 1(while~continue~break) (0) | 2010.11.13 |
033. 중첩 순환문 이해하기(for~continue~break) (0) | 2010.11.13 |
032. 중첩 조건문 이해하기(if~else) (0) | 2010.11.13 |
031. sizeof 연산자 이해하기 (0) | 2010.11.13 |