五、编程题(本大题共5小题,第1、2题各4分,第3题10分,第4、5题各6分,共30分)
36.[参考答案]
①read(num);或readln(num);
②num>=0
③odd(num)(或等价表达式)
④read(num)或readln(num)
37.[参考答案]
①true
②I mod j=0(或 i=i div j*j 或等价表达式)
③isprime:=b
④isprime(p)and isprime(p+10)and isprime(p+22)
38.[参考答案]
①to n
②to n
③a[i]>a[j]
④(a[i]=a[j])and(i>j)
⑤write(c[i]:4)
③④两者不交换
39.[参考答案]
①eof(f)
②f,x
③x DO
④f,x
40.[参考答案]
①first<>nil
②sumofelem+first∧.x
③first:=first∧.next
上一页 [1] [2] [3] [4] [5] [6] [7]
责任编辑:cyth