"修改例题的程序,在每一case语句之后增加break 语句, 使每一次执行之后均可跳出switch语句,从而避免输出不应有的结果。【例4-10】<br>#include<br>intmain(void){<br>inta;<br>printf(""input integer number: "");<br>scanf(""%d"",&a);<br>switch(a){<br>case1:printf(""Monday\n"");break;<br>case2:printf(""Tuesday\n"");break;<br>case3:printf(""Wednesday\n"");break;<br>case4:printf(""Thursday\n"");break;<br>case5:printf(""Friday\n"");break;<br>case6:printf(""Saturday\n"");break;<br>case7:printf(""Sunday\n"");break;<br>default:printf(""error\n"");<br>}<br>return0;<br>}<br>在使用switch语句时还应注意以下几点:<br>在case后的各常量表达式的值不能相同,否则会出现错误。<br>在case后,允许有多个语句,可以不用{}括起来。<br>各case和default子句的先后顺序可以变动,而不会影响程序执行结果。<br>default子句可以省略不用。"
1.概念:以过去某个时间为标准,在此以前发生的动作或行为,或在过去某动作之前完成的行为,即“过去的过去”。2.时间状语:before, by the end of last year(term, month…),etc.3.基本结构:had + done.4.否定形式:had + not + done.5.一般疑问句:had放于句首。6.例句:As soon as we got to the station, the train had left.By the end of last month. We had reviewed four books.现在完成进行时