给定一个C程序的代码片段, 如下:if(grade=='A'|| grade == 'B')score=90;else if(grade=='C'||grade=='D')score=70;elsescore=60;把这段代码转换为switch语句,以下正确的是 ( )。
A. a)switch(grade){case'A':case'B':score=90;case'C':case'D':score=70;default:score=60;}
B. b)switch(grade){case'A':break;case'B':score=90;case'C':break;case'D':score=70;default:score=60;break;}
C. c)switch(grade){case'B':score=90;break;case'D':score=70;break;default:score=60;break;}
D. d)switch(grade){case'A':case'B':score=90;break;case'C':case'D':score=70;break;default:score=60;break;}