61 date:2021.3.7
要点:
详细代码如下:
#include <stdio.h>
double fun(double e)
{
int i, k; double s, t, x;
s=0; k=1; i=2;
/**********found**********/
x=3.0/4; // 或 (double)3/4;
/**********found**********/
while(x > e)
{
s=s+k*x;
k=k* (-1);
t=2*i;
/**********found**********/
x=(t+1)/(t*t);
i++;
}
return s;
}
void main()
{
double e=1e-3;
printf("\nThe result is: %f\n",fun(e));
}
要点:
详细代码如下:
#include <stdio.h>
#define M 4
int fun (int a[][M])
{
/*
analyse:
*/
int i,j,max = a[0][0];
for(i = 0; i<2; i++)
{
for(j = 0; j < M; j++)
{
if( max < a[i][j])
max = a[i][j];
}
}
return max;
}
void main( )
{
int arr[2][M]={
5,8,3,45,76,-4,12,82} ;void NONO ();
printf("max =%d\n", fun(arr)) ;
NONO( ) ;
}