1 개요[ | ]
- C switch
C
CPU
0.0s
MEM
18M
0.0s
Copy
#include <stdio.h>
void main()
{
int age = 3;
switch (age)
{
case 1:
printf("You're one.");
break;
case 2:
printf("You're two.");
break;
case 3:
printf("You're three.");
case 4:
printf("You're three or four.");
break;
default:
printf("You're not 1, 2, 3 or 4!");
}
}
You're three.You're three or four.
2 같이 보기[ | ]
3 참고[ | ]
편집자 Jmnote
로그인하시면 댓글을 쓸 수 있습니다.
- 분류 댓글:
- C (7)
C, C++ 주석 ― YkhwongC, C++ 주석 ― John JeongC, C++ 주석 ― JmnoteC, C++ 주석 ― John JeongC언어 연결리스트 구현 ― 돌멩이C언어 연결리스트 구현 ― John JeongC언어 연결리스트 구현 ― 돌멩이