程序错误,请改正

[复制链接]
查看11 | 回复0 | 2009-7-9 21:31:59 | 显示全部楼层 |阅读模式
提示
lab2.cpp
E:\math test\lab2\lab2.cpp(16) : error C2660: 'GaussElimination_ColumnSelect' : function does not take 2 parameters
E:\math test\lab2\lab2.cpp(21) : error C2065: 'getch' : undeclared identifier
程序如下
#include
#include
using namespace std;
#define n 4
/*方程组的阶数*/
#define precision 1e-6
static double aa[n][n+1]={{-3,-1,0,0,1},{-1,2,-1,0,0},{0,-1,2,-1,0},{0,0,-1,2,0}};

/*增广矩阵的原始数据*/
void main()
{int i,j,det;
double a[n+1][n+2],x[n+1];
int GaussElimination_ColumnSelect();
for(i=1;ifabs(a[r][k]))r=i;
if(fabs(a[r][k])=1;k--)
/*回代过程*/
{x[k]=a[k][n+1];
for(j=k+1;jint GaussElimination_ColumnSelect(double a[][n+2],double x[n+1]);Line21:getch=>getchar();编译通过 效果不知...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行