上一页 1 ··· 5 6 7 8 9

MS Access数据库连接

摘要: 用DSN连接并且没有用户名和密码:<%set conn = Server.CreateObject("ADODB.Connection")conn.open "YourDSNName"%>用DSN连接并且有用户名和密码:<%set conn = Server.CreateObject("ADODB. 阅读全文
posted @ 2009-01-24 10:03 Jacky Yu 阅读(173) 评论(0) 推荐(0) 编辑

用拉格朗日插值多项式求函数的近似值

摘要: 1 //用拉格朗日插值多项式求函数的近似值 2 #include 3 using namespace std; 4 void main() 5 { 6 int n,i; 7 float xx,yy; 8 float *x,*y; 9 cout>n; 11 x=new float[n]; 12 y=new float[n]; 13 ... 阅读全文
posted @ 2008-03-27 09:15 Jacky Yu 阅读(1459) 评论(0) 推荐(0) 编辑

用矩阵直接三角分解法求解方程组

摘要: 1 //用矩阵直接三角分解法求解方程组 2 #include 3 #include 4 using namespace std; 5 void main() 6 { 7 int n,i; 8 float *a,*x; 9 cout>n; 11 12 a=new float[n*(n+1)]; //开辟增广矩阵的存储空间 13 ... 阅读全文
posted @ 2008-03-25 09:26 Jacky Yu 阅读(1188) 评论(0) 推荐(0) 编辑

用C++计算圆的周长和面积

摘要: 1 #include 2 void main() 3 { 4 float r; 5 double cir,area; 6 const double pi=3.1415926; 7 printf ("please enter a numbers as radius:"); 8 scanf ("%f",&r); 9 cir=2.0*... 阅读全文
posted @ 2008-03-24 09:23 Jacky Yu 阅读(2321) 评论(0) 推荐(0) 编辑

采用C++语言计算三角形的面积

摘要: 1 #include 2 #include 3 void main() 4 { 5 float a,b,c; 6 double s,area; 7 printf ("please enter three numbers as a b c \n"); 8 scanf ("%f%f%f",&a, &b, &c); 9 s=0.5*(a+b... 阅读全文
posted @ 2008-03-24 09:21 Jacky Yu 阅读(2834) 评论(0) 推荐(0) 编辑

采用二分法求方程的根

摘要: 1 //此方法用来求方程x*(e^x)-1=0在一个[x1,x2]反外内的根,x1,x2的值在运行时输入// 2 #include 3 #include 4 using namespace std; 5 double f(double x) 6 { 7 double y; 8 y=exp(x)*x-1; 9 return y; 10 } 11 12 d... 阅读全文
posted @ 2008-03-24 09:20 Jacky Yu 阅读(237) 评论(0) 推荐(0) 编辑

C++编写乘法口诀

摘要: 1 #include 2 using namespace std; 3 void main() 4 { 5 int i,j; 6 for(i=1;i<10;i++) 7 { 8 for(j=1;j<=i;j++) 9 { 10 cout<<j<<"X"<<i<<"="<<i*j<<" "; 11 ... 阅读全文
posted @ 2008-03-24 09:17 Jacky Yu 阅读(458) 评论(0) 推荐(0) 编辑

牛顿迭代法求方程2*x*x*x-4*x*x+3*x-6=0在0.5附近的根

摘要: 1 #include 2 #include 3 using namespace std; 4 5 //牛顿迭代法求方程2*x*x*x-4*x*x+3*x-6=0在0.5附近的根。 6 void ND_method(double x) 7 { 8 double x0,f,f1; 9 do 10 { 11 x0=x; 12 ... 阅读全文
posted @ 2008-03-23 09:10 Jacky Yu 阅读(160) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9