南开100题最后一部分
91.void fun(int a,int b,long * c)
{ * c =(a % 10)* 1000+(b % 10)* 100+(a/10)* 10+b/10;}
92 . double fun(int m)
{ int I;
double s=0.0,log(double x);
for(I = 1;is = s+log(I);
s = sqrt(s);
return s;}
93。double fun(double x,int n)
{double s=1.0,p = 1.0
int i,j,t;
for(I = 1;j { t = 1;
for(j = 1;JT = t * j;
p = p * x;
s = s+p/t;}
return s;}
94。void fun(char * a)
{ int I = 0;
char * p = a;
while(* p & * p = = ' *)
p++;
while(* p)
{ a = * p;
i++;
p++;}
a = ' \ 0 ';}
95。void fun(char *a,int n)
{int i=0,k = 0;
char * t = a;
while(* t = = ' * ')
{ k++;
t++;}
t = a;
if(k > n)
t = a+k-n;
while(* t)
{ a = * t;
i++;
t++;}
a = ' \ 0 ';}
96。double fun(double x[br/]100。double fun(int n)
{ int I;
双s=1.0,p = 1.0
for(I = 2;i{p+=pow(i,0.5);
s+= p;}
return s;})
{ double sun = 0.0;
int i,j = 1;
for(I = 0;IIF(j { sun+= sqrt((x+x[I+1])/2.0);
j++;}
返回总和;}
97 . double fun(int n)
{ int I,j;
double sum=0.0,t;
for(I = 1;i { t = 0.0
for(j = 1;JT+= j;
sum+= 1.0/t;}
返回总和;}
98。double fun(int n)
{ int I;
double sum = 0.0;
for(I = 1;IIF(I % 5 = = 0‖I % 9 = = 0)
sun+= 1.0/I;
返回总和;}
99。double fun(int n)
{int m,k,I;
双s = 0.0
for(m = 3;m { k = sqrt(m);
for(I = 2;iif (m%i==0)中断;
if(I > = k+1)
s+= sqrt(m);}
return s;}
[9]
位律师回复
0条评论