第10题: [单项选择]Christopher Peake's hair didn't look so bad because ______. A. he was wearing a handsome tuxedo B. he was wearing tulips on his suit C. he was seen among flowers D. he was sitting near flowers and in very soft light 参考答案:D 答案解析:见第一段最后一句。
第11题: [填空题]下列是一个Java应用程序,填空使它的功能是计算s=1+2+3+4+…+100。
public class Testkk {
public static void main(String args[])
{ int s=0;
for(int i=1;i〈=100;i++)
{ s+=【 】;}
System.out.println("S="+s);
}
}
参考答案:i 答案解析:巧用扩展赋值号+=。比如:a+=1;等价于a=a+1。注意:类似这样的扩展赋值号还有*=,%=等。