개요
- C switch
#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!");
}
}