C语言程序设计Word格式文档下载.docx
《C语言程序设计Word格式文档下载.docx》由会员分享,可在线阅读,更多相关《C语言程序设计Word格式文档下载.docx(67页珍藏版)》请在冰点文库上搜索。
a=a/i;
第3套校园网·
10*x
n/10
*t=0;
if(d%2!
=0)
voidfun(charp1[],charp2[])
while(*p1)p1++;
while(*p2)
*p1=*p2;
p1++;
p2++;
*p1=0;
第4套校园网·
第一空j:
o
i++
for(i=2;
=m;
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;
第5套校园网·
[M]
N
O
t=1;
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;
第6套校园网·
[N]
t[i][j]
t[j][i]
#defineFU(m,n)((m)/(n))
return(value);
voidfun(char*a)
inti=0,j=0;
while(a[i]=='
)i++;
while(a[i])
a[j]=a[i];
a[j]=0;
第7套校园网·
k
a[k][i]
for(i=strlen(t)-1;
i;
i--)
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;
第8套校园网·
999
t/10
x
voidfun(longs,long*t)
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;
第9套校园网·
sum=0
t[i][i]
1
doubler;
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套校园网·
char
ch<
9'
'
0'
b[k]=*p;
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
voidfun(char*s,char*t)
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
n=strlen(aa);
ch=aa[i];
if(s<
h->
s)s=h->
第13套校园网·
【13.1.1】N
【13.1.2】substr
【13.1.3】0
fun(intx,inty,intz)
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
voidfun(inta[][M],intm)
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
c=tolower(c);
c=c+5;
doubles=0,a=0;
a+=sqrt(i);
第16套校园网·
【16.1.1】&
【16.1.2】'
【16.1.3】ch
voidfun(int*a)
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
if((k%13==0)||(k%17==0))
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
=3;
if(k>
=0&
k<
=6)
第19套校园网·
【19.1.1】t,s
【19.1.2】s[i]
【19.1.3】0
if(i%k==0)
=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
char*fun(char(*sq)[M])
returnsp;
*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]
switch(g)
case1:
return1;
case2:
return1;
voidfun(STREC*a)
N;
i++)s+=a->
s[i];
a->
ave=s/N;
第22套校园网·
t[][N]
【22.1.2】i=0;
【22.1.3】s
fun(inta[],intm)
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
sum=0;
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
d=1;
s=0;
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
k=i;
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
doublefun(doublea,doublex0)
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)
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)
for(i=0;
str[i];
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]
floatfun(intk)
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
q=p+i;
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
if(n==0)
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]
intk=0;
while(*p||*q)
inti=0,k;
k=i;
while(a[i]!
)/*以下程序段实现非*字符前移*/
if(a[i]!