C언어 switch

1 개요[ | ]

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!");
    }
}

2 같이 보기[ | ]

3 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}