皮皮学,免费搜题
登录
搜题
【单选题】
围绕山顶一圈有N个山洞,编号为0、1、2、3、......、N-1,有一只狐狸和一只兔子在洞中居住。狐狸总想找到兔子并吃掉它,它的寻找方法是先到第一个洞(即编号为0的洞)中找;再隔1个洞,即到编号为2的个洞中找;再隔2个洞,即到编号为5的洞中找;下次再隔3个洞;即到编号为9的洞中找;......。若狐狸找一圈,请为兔子指出所有不安全的洞号。用a数组元素模拟一个洞,数组元素的下标即为洞号,数组元素中的值为0时,表示该洞安全,为1时表示该洞不安全。若形参n的值为30时,不安全的洞号是0、2、5、9、14、20、27。 #include #define N 100 void fun( int *a , int n ) { int i, t; for( i=0; i /**********found**********/ a[i]=___1___; i=0; t=1; while( i { a[i]= 1; t++; i=i+t; } } main() { int a[N], i, n=30; fun( a, n); for(i=0; i if( a[i]==1 ) printf("不安全的洞号是 : %d\n",i ); }
A.
1
B.
0
C.
n
D.
i
拍照语音搜题,微信中搜索"皮皮学"使用
参考答案:
参考解析:
知识点:
.
..
皮皮学刷刷变学霸
举一反三
【判断题】Jonathan lives with six people.
A.
正确
B.
错误
【单选题】—More and more people have got to know the importance of English. ________,about six people in ten in this city are able to speak English. —That’s great.
A.
In other words
B.
Believe it or not
C.
To be honest
D.
To tell the truth
【单选题】行下牙槽神经阻滞麻醉时,针尖深入组织3.0cm未触及骨面,应该()
A.
退出1.0cm,加大进针角度
B.
退出1.0cm,减小进针角度
C.
退至黏膜下,减小进针角度
D.
拔出注射针,重新注射
E.
退至黏膜下,加大进针角度
【单选题】Because of the bombing that killed six people Washington has been urging the spokesman to ______ terrorism more severely.
A.
charge
B.
censor
C.
blame
D.
denounce
【单选题】第二篇 A new international study shows that six people die every minute from smoking. That equals 3 million deaths around the world every year. If the present rate (率)of smoking continues, the number of ...
A.
we must give up smoking
B.
smoking causes lung caner
C.
smoking does harm to health
D.
men like smoking much more than women
【简答题】控制电路中一般要进行哪些保护?
【单选题】More and more people have got to know the importance of the English study. ______, about six people in ten in this city are able to speak a little English.
A.
Believe it or not
B.
In other words
C.
Besides
D.
However
【单选题】行下牙槽神经阻滞麻醉时,针尖深入组织3.0cm未触及骨面,应该
A.
退出1.0cm,加大进针角度
B.
退出1.0cm,减小进针角度
C.
退至黏膜下,减小进针角度
D.
拔出注射针,重新注射
E.
退至黏膜下,加大进针角度
【简答题】生物的亲代传递给子代一套遗传信息,使子代在形态、构造、生态、生理生化等方面与亲代保持相似性,这种现象称为 。
【单选题】A new international study shows that six people die every minute from smoking. That equals 3 million deaths around the world every year. If the present rate (率)of smoking continues, the number of deat...
A.
we must give up smoking
B.
smoking causes lung caner
C.
smoking does harm to health
D.
men like smoking much more than women
相关题目: