新视野答案统计Word格式.docx
《新视野答案统计Word格式.docx》由会员分享,可在线阅读,更多相关《新视野答案统计Word格式.docx(32页珍藏版)》请在冰点文库上搜索。
【4.1.1】j
【4.1.2】0
【4.1.3】i++
【4.2.1】for(i=2;
=m;
【4.2.2】y-=1.0/i/i;
intfun(intscore[],intm,intbelow[])
inti=0,s=0,n=0;
for(i=0;
m;
i++)s+=score[i];
s/=m;
if(score[i]<
s)
below[n]=score[i];
n++;
returnn;
第05套填空题:
【5.1.1】[M]
【5.1.2】N
【5.1.3】0
【5.2.1】t=1;
【5.2.2】return(2*s);
编程题voidfun(char*a,intn)
/*以下代码仅供参考*/
inti=0,j,k=0;
while(a[k]=='
*'
)k++;
/*k为统计*字符个数*/
if(k>
n)
i=n;
j=k;
/*以下完成将下标为k至串尾的字符前移k-n个位置*/
while(a[j])
a[i]=a[j];
j++;
a[i]=0;
第06套填空题:
【6.1.1】[N]
【6.1.2】t[i][j]
【6.1.3】t[j][i]
【6.2.1】#defineFU(m,n)((m)/(n))
【6.2.2】return(value);
编程题voidfun(char*a)
inti=0,j=0;
while(a[i]=='
)i++;
while(a[i])
a[j]=a[i];
a[j]=0;
第07套填空题:
【7.1.1】k
【7.1.2】N
【7.1.3】a[k][i]
【7.2.1】for(i=strlen(t)-1;
i;
i--)
【7.2.2】if(t[j]>
t[j+1])
编程题voidfun(char*ss)
inti=1;
while(ss[i-1]&
&
ss[i])
if(ss[i]>
='
a'
ss[i]<
z'
)ss[i]+='
A'
-'
;
i+=2;
第08套填空题:
【8.1.1】999
【8.1.2】t/10
【8.1.3】x
【8.2.1】voidfun(longs,long*t)
【8.2.2】while(s>
0)
编程题voidfun(STRECa[])
STRECtmp;
inti,j;
for(i=0;
i<
N;
i++)
for(j=i+1;
j<
j++)
{/*请按题目要求完成以下代码*/
if(a[i].s<
a[j].s)
tmp=a[i];
a[i]=a[j];
a[j]=tmp;
第09套填空题:
【9.1.1】sum=0
【9.1.2】t[i][i]
【9.1.3】1
【9.2.1】doubler;
【9.2.2】while(fabs(m-n)>
0.001)
编程题voidfun(char*a,char*h,char*p)
a=h;
while(h!
=p)
if(*h!
)
*a=*h;
a++;
h++;
while(*p)
*a=*p;
p++;
*a=0;
第10套填空题:
【10.1.1】char
【10.1.2】ch<
9'
【10.1.3】'
0'
【10.2.1】b[k]=*p;
【10.2.2】b[k]='
'
k++;
编程题doublefun(STREC*h)
doubles=0;
while(h->
next)
h=h->
next;
s+=h->
s;
s/=i;
第11套填空题:
【11.1.1】0
【11.1.2】i++
【11.1.3】2.*i
【11.2.1】voidfun(char*s,char*t)
【11.2.2】t[2*d]=0;
编程题voidfun(char*s,chart[])
while(s[i])
if(i%2==1&
s[i]%2==1)
t[j]=s[i];
t[j]=0;
第12套填空题:
【12.1.1】
(fp)
【12.1.2】==
【12.1.3】fp
【12.2.1】n=strlen(aa);
【12.2.2】ch=aa[i];
if(s<
h->
s)s=h->
第13套填空题:
【13.1.1】N
【13.1.2】substr
【13.1.3】0
【13.2.1】fun(intx,inty,intz)
【13.2.2】returnj;
编程题voidfun(char*a,intn,inth,inte)
n-h-e;
i++)a[i]=a[i+h];
第14套填空题:
【14.1.1】k
【14.1.2】N-1
【14.1.3】temp
【14.2.1】voidfun(inta[][M],intm)
【14.2.2】a[j][k]=(k+1)*(j+1);
voidfun(inta,intb,long*c)
*c=a/10*10+a%10*1000+b/10+b%10*100;
第15套填空题:
【15.1.1】a
【15.1.2】a
【15.1.3】b
【15.2.1】c=tolower(c);
【15.2.2】c=c+5;
doubles=0,a=0;
a+=sqrt(i);
第16套填空题:
【16.1.1】&
【16.1.2】'
【16.1.3】ch
【16.2.1】voidfun(int*a)
【16.2.2】a[j]=a[j-1];
编程题intfun(intn)
inti,s=0;
for(i=2;
n;
if(n%i==0)s+=i;
第17套填空题:
【17.1.1】48
【17.1.2】s++
【17.1.3】sum
【17.2.1】if((k%13==0)||(k%17==0))
【17.2.2】}
编程题doublefun(intn)
for(i=21;
if(i%3==0&
i%7==0)s+=i;
returnsqrt(s);
第18套填空题:
【18.1.1】1
【18.1.2】-1
【18.1.3】t
【18.2.1】for(i=1;
=3;
【18.2.2】if(k>
=0&
k<
=6)
第19套填空题:
【19.1.1】t,s
【19.1.2】s[i]
【19.1.3】0
【19.2.1】if(i%k==0)
【19.2.2】if(k>
=i)
编程题voidfun(intx,intpp[],int*n)
for(i=1,*n=0;
=x;
i+=2)
if(x%i==0)
pp[*n]=i;
(*n)++;
第20套填空题:
【20.1.1】structstudent*
【20.1.2】a->
score[i]
【20.1.3】a
【20.2.1】char*fun(char(*sq)[M])
【20.2.2】returnsp;
编程题voidfun(inta,intb,long*c)
*c=a/10*100+a%10+b/10*10+b%10*1000;
第21套填空题:
【21.1.1】a[i]
【21.1.2】a[j]
【21.1.3】a[j]
【21.2.1】switch(g)
【21.2.2】case1:
return1;
case2:
return1;
编程题voidfun(STREC*a)
N;
i++)s+=a->
s[i];
a->
ave=s/N;
第22套填空题:
【22.1.1】t[][N]
【22.1.2】i=0;
n
【22.1.3】s
【22.2.1】fun(inta[],intm)
【22.2.2】elseif(m>
a[mid])
voidfun(char*a,char*p)
char*b=a;
while(b<
p)
if(*b!
*a=*b;
b++;
第23套填空题:
【23.1.1】*a
【23.1.2】2
【23.1.3】i+1
【23.2.1】sum=0;
【23.2.2】if((i+1)%5==0)
编程题doublefun(STREC*a,STREC*b,int*n)
i++)s+=a[i].s;
s/=N;
for(i=0,*n=0;
b[*n]=a[i];
第24套填空题:
【24.1.1】x
【24.1.2】n
【24.1.3】t
【24.2.1】d=1;
s=0;
【24.2.2】d=d/10;
编程题doublefun(doublex[9])
8;
i++)s+=sqrt((x[i]+x[i+1])/2);
第25套填空题:
【25.1.1】1
【25.1.2】1
【25.1.3】i
【25.2.1】k=i;
【25.2.2】c=k;
编程题doublefun(doublex[10])
doubles=0,x1=0;
10;
i++)x1+=x[i];
x1/=10;
i++)s+=(x[i]-x1)*(x[i]-x1);
s=sqrt(s/10);
第26套填空题:
【26.1.1】->
sno
【26.1.2】->
name
【26.1.3】&
t
【26.2.1】doublefun(doublea,doublex0)
【26.2.2】if(fabs(x1-x0)>
0.00001)
if(a[i].s>
=s)
第27套填空题:
【27.1.1】1
【27.1.2】2*i
【27.1.3】
(-1)
【27.2.1】k++;
【27.2.2】if(m==k)
编程题voidfun(inta[],intn,int*max,int*d)
for(i=1,*max=a[0],*d=0;
if(*max<
a[i])
*max=a[i];
*d=i;
第28套填空题:
【28.1.1】0
【28.1.2】n
【28.1.3】
(t*t)
【28.2.1】for(i=0;
str[i];
【28.2.2】if(substr[k+1]==0)
doublefun(doubleeps)
while(a>
eps)
a=a*i/(2*i+1);
returns*2;
第29套填空题:
【29.1.1】*s
【29.1.2】1
【29.1.3】k[n]
【29.2.1】floatfun(intk)
【29.2.2】returns;
doublefun(intn)
s+=1.0/(i*(i+1));
第30套填空题:
【30.1.1】structstudent
【30.1.2】n-1
【30.1.3】a[i].name,a[j].name
【30.2.1】q=p+i;
【30.2.2】while(q>
编程题intfun(STREC*a,STREC*b,intl,inth)
for(i=0,j=0;
=l&
a[i].s<
=h)
b[j]=a[i];
returnj;
第31套填空题:
【31.1.1】a[i]%2
【31.1.2】a[j]
【31.1.3】j
【31.2.1】fun(intn)
【31.2.2】if(n==1)
voidfun(char*a,intn)
if(a[i]=='
)j++;
elsej=0;
if(j>
a[i-j+n]='
\0'
第32套填空题:
【32.1.1】10
【32.1.2】0
【32.1.3】x
【32.2.1】if(n==0)
【32.2.2】result*=n--;
longfun(char*p)
inti,len;
/*len为串长*/
longx=0;
len=strlen(p);
/*以下完成数字字符串转换为一个数字。
注意:
字符'
不是数字0*/
len;
i++)x=x*10+p[i]-'
returnx;
第33套填空题:
【33.1.1】N
【33.1.2】k
【33.1.3】ss[i]
【33.2.1】intk=0;
【33.2.2】while(*p||*q)
voidfun(char*a)
inti=0,k;
k=i;
while(a[i]!
)/*以下程序段实现非*字符前移*/
if(a[i]!
a[k]=a[i];
k++;
a[k]='
第34套填空题:
【34.1.1】n++
【34.1.2】0
【34.1.3】s++
【34.2.1】t+=s[k];
【34.2.2】*aver=ave;
voidfun(int*s,intt,int*k)
*k=0;
t;
if(s[i]>
s[*k])*k=i;
第35套填空题:
【35.1.1】s[i]
【35.1.2】k
【35.1.3】0
【35.2.1】while(*w)
【35.2.2】if(*r==*p)
voidfun(char*s,chart[])
if(s[i]%2==0)
第36套填空题:
【36.1.1】N
【36.1.2】i
【36.1.3】-1
【36.2.1】a2=k/10;
【36.2.2】returni;
)j=0;
elsej++;
a[i-j]=0;
第37套填空题:
【37.1.1】s
【37.1.2】--
【37.1.3】return0
【37.2.1】doublefun(intn)
【37.2.2】c=a;
a+=b;
b=c;
voidfun(intm,intk,intxx[])
intj=0,t=m+1;
while(j<
k)
/*按题目要求完成以下代码*/
if(prime(t))
xx[j]=t;
t++;
第38套填空题:
【38.1.1】3.
【38.1.2】>
【38.1.3】
(2*i+1)
【38.2.1】doublefun(intn)
【38.2.2】s=s+(double)a/b;
intfun(inta[][M])
inti,s=a[0][0];
M;
if(a[0][i]>
s)s=a[0][i];
if(a[1][i]>
s)s=a[1][i];
第39套填空题:
【39.1.1】n/2
【39.1.2】i
【39.1.3】a[n-i-1]
【39.2.1】n=*p-'
【39.2.2】n=n*8+*p-'
STRECfun(STREC*a,char*b)
STRECt={'
-1};
if(strcmp(a[i].num,b)==0)t=a[i];
returnt;
第40套填空题:
【40.1.1】a
【40.1.2】b.name
【40.1.3】score[i]
【40.2.1】s[j++]=s[i];
【40.2.2】s[j]=0;
v