矩阵计算器课程设计 c语言,一个有关向量与矩阵的实用计算器程序

该楼层疑似违规已被系统折叠 隐藏此楼查看此楼

{

int nRowNum, nColNum;

if((nRow1!=nRow2)||(nCol1!=nCol2))

return 0;

for( nRowNum=0;nRowNum

for(nColNum=0;nColNum

{

if(npMatrix1[nRowNum][nColNum]!=npMatrix2[nRowNum][nColNum])

return 0;

}

return 1;

}

void Init_f()

{

printf("**************************************************\n\n");

printf("        Welcom to Vector and Matrix Calculator!\n");

printf("\n**************************************************\n\n ");

printf("1. Vector\n2. Matrix\n3.Vector And Matrix\n4.Exit\n\n");

printf("Please Input Your Choice\n");

}

void VectorAdd_f()

{

int npVector1[N], npVector2[N], npSum[N];

int nDimen;

InputVector_f(&nDimen, npVector1);

InputVector_f(&nDimen, npVector2);

CalcAddVector_f(nDimen, npVector1,npVector2,npSum);

PrintVector_f(nDimen, npSum);

}

void VectorMatrixOperator_f() {}

void MatrixOperator_f(){}

void Compare_f(){}

void NumMul_f(){}

void VectorSub_f(){}

void VectorOperator_f()

{

char chChoice;

printf(" 1.Add\n   2. Subtration\n   3.NumMultiplication\n    4. Compare\n   5. Exit\n\n");

printf("Please Input Your Choice\n");

scanf(" %c", &chChoice);

do

{

switch(chChoice)

{

case '1': VectorAdd_f(); break;

case '2': VectorSub_f();   break;

case '3': NumMul_f(); break;

case '4': Compare_f(); break;

case '5': break;

default:

printf("Violative Input.   Input Again!\n" );

scanf(" %c", &chChoice);

break;

}

}while(chChoice!='5');

}

void main()

{

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值