问题 多项选择题

编程题请编写一个函数void fun(int m, int k, int xx[]),该函数的功能是:将大于整数m且紧靠m的k个非素数存入所指的数组中。例如,若输入15,5,则应输出16,18,20,21,22。注意:部分源程序给出如下。请勿改动主函数main和其他函数中的任何内容,仅在函数fun的花括号中填入所编写的若干语句。试题程序:#include #include void fun(int m, int k, int xx[]){}main(){ int m,n,zz[1000]; clrscr(); printf("\nPlease enter two integers: "); scanf("%d%d",&m,&n); fun(m, n, zz); for(m=0;m

答案

参考答案:void fun(int m, int k, int xx[]){ int i,j,n; for(i=m+A,n=0;n

解析:本题只要掌握了判断非素数和素数的算法即不难完成了,其实程序缺少部分也正是这部分。

完形填空
完形填空。
     Qu Yuan was born in China around 2000 years ago. His job was to give some    1    to the king. The
old king always took his advice.    2    the new king didn't like listening to Qu Yuan after the old king    3   .
Qu Yuan finally   4    his job.
     Qu Yuan was very    5    at writing poems (诗). People still love his poems very much now. He was a 
  26   poet (诗人), but he was always    7    because the king didn't take his advice and it made his country
lose many battles (战役).
     At last, he jumped into a    8    and died. It was the    9    day of the fifth lunar (农历) month that year.
     The Chinese people will never   10   Qu Yuan. They eat rice dumplings (粽子) and have dragon (龙)
boat race in honor of (纪念) him every year.
( )1. A. job    
(     )2. A. But    
( )3. A. were off 
(     )4. A. got      
(     )5. A. good     
(     )6. A. usual    
(     )7. A. exciting 
(     )8. A. river    
(     )9. A. eight                     
(     )10. A. forget 
B. advice                  
B. And                      
B. stayed in the country   
B. lost                    
B. hard                    
B. happy                   
B. sad                     
B. mountain                
B. six                     
B. remember                     
C. idea      
C. Then      
C. died      
C. wanted    
C. bad       
C. talented                                       
C. healthy   
C. town      
C. fifth     
C. study