设变量已正确定义,以下( )与其它switch语句不等价。
A. switch(op){case '+': printf("%d\n", value1 + value2); break;case '-': printf("%d\n", value1 - value2); break;case '*': printf("%d\n", value1 * value2); break;default: printf("Error\n"); break;}
B. switch(op){default: printf("Error\n"); break;case '*': printf("%d\n", value1 * value2); break;case '-': printf("%d\n", value1 - value2); break;case '+': printf("%d\n", value1 + value2); break;}
C. if(op != '+' && op != '-' && op != '*'){printf("Error\n");}else{switch(op){case '+': printf("%d\n", value1 + value2); break;case '-': printf("%d\n", value1 - value2); break;case '*': printf("%d\n", value1 * value2); break;}}
D. switch(op){case '+': printf("%d\n", value1 + value2); break;case '-': printf("%d\n", value1 - value2); break;case '*': printf("%d\n", value1 * value2); break;}