"修改例题的程序,在每一case语句之后增加break 语句, 使每一次执行之后均可跳出switch语句,从而避免输出不应有的结果。<br>【例4-10】#includeint main(void){ int a; printf(""input integer number: ""); scanf(""%d"",&a); switch (a){ case 1:printf(""Monday\n""); break; case 2:printf(""Tuesday\n""); break; case 3:printf(""Wednesday\n""); break; case 4:printf(""Thursday\n""); break; case 5:printf(""Friday\n""); break; case 6:printf(""Saturday\n""); break; case 7:printf(""Sunday\n""); break; default:printf(""error\n""); } return 0; }<br>在使用switch语句时还应注意以下几点:在case后的各常量表达式的值不能相同,否则会出现错误。在case后,允许有多个语句,可以不用{}括起来。各case和default子句的先后顺序可以变动,而不会影响程序执行结果。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.现在完成进行时