标签:在线视频 ble bre 分享 ima size 链接 baidu clu
百度网盘链接
VC6.0 密码:t6bd
VS2010 密码:3of2
最后和大家分享一个实现行列式算法的C代码
/*====================================================================================*/
/*在VC6.0及VS2010已通过运行*/
#include <stdio.h>
#define N 20
void main()
{
int z , r , j , i;
double a[N][N], m = 1.0, k;
printf("请输入行列式的阶数:");
scanf("%d",&r);
printf("*****************请输入数字*****************\n");
for(i = 0; i < r; i++)
for(j = 0; j < r; j++)
scanf("%lf",&a[i][j]);
for(z = 0; z < r-1; z++)
for(i = z; i < r-1; i++)
{
if(a[z][z] == 0)
for(i = z ; a[z][z] == 0 ; i++)
{
for(j = 0; j < r; j++)
a[z][j] = a[z][j] + a[i+1][j];
if(a[z][z] != 0)
break;
}
k = -a[i+1][z] / a[z][z];
for(j = z ; j < r ; j++)
a[i+1][j] = k * (a[z][j]) + a[i+1][j];
}
for(z = 0 ; z < r ; z++)
m = m*(a[z][z]);
printf("%g\n",m);
}
标签:在线视频 ble bre 分享 ima size 链接 baidu clu
原文地址:http://www.cnblogs.com/veis/p/6938554.html