?? 9gaus0.c
字號:
#include "math.h"
#include "stdio.h"
#include "9gaus.c"
main()
{ static int js[3]={4,4,4};
double s,gausf(int,double []);
void gauss(int,int,double [],double []);
s=gaus(3,js,gauss,gausf);
printf("\n");
printf("s=%e\n",s);
printf("\n");
}
void gauss(j,n,x,y)
int j,n;
double x[],y[];
{ double q;
n=n;
switch (j)
{ case 0: { y[0]=0.0; y[1]=1.0; break;}
case 1: { y[0]=0.0; y[1]=sqrt(1.0-x[0]*x[0]); break;}
case 2: { q=x[0]*x[0]+x[1]*x[1]; y[0]=sqrt(q);
y[1]=sqrt(2.0-q); break;
}
default: { }
}
return;
}
double gausf(n,x)
int n;
double x[];
{ double z;
n=n;
z=x[2]*x[2];
return(z);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -