switch1 switch 1. 문법 switch (n) { case constant1: // code to be executed if n is equal to constant1; break; case constant2: // code to be executed if n is equal to constant2; break; . . . default: // code to be executed if n doesn't match any constant } 2. 소스 # include int main() { char operator; double firstNumber,secondNumber; printf("Enter an operator (+, -, *,): "); scanf("%c", &operator); printf("Enter t.. 2016. 7. 12. 이전 1 다음