全文预览

基于C语言实现大规模节点方程的LU分解算法

上传者:梦溪 |  格式:docx  |  页数:19 |  大小:338KB

文档介绍
stdio・h>#iDelude<iostream.h>^include<iomanip.h>#include<stdlib.h>^include<fstream・h>#incltide<string・h>//#pragmapackage(smartinit)^pragmaresource“*.dfnT^defineN230TForml*Forml;floatA[N+l][N+l],X[N+l],Y[N+l],B[N+l],s,sl,s2,det;//det为矩阵的行列式inti,j,k,p,num;//?fastcallTForml::TForml(TComponent*Owner):TForm(Owner){}//?voidfastcallTForml::ButtonlClick(TObject^Sender){intbutton;StringedtOpenFi1eName;fstreamAfile;num=StrTolnt(InputBoxC方程阶数","输入方程阶数n:,z,""));OpenDialogl->Filter=,,TextFiles(*・txt)*・txt";OpenDialogl->Tniti?ilDir=Application->ExeName;OpenDialogl->Title=,/打幵文件";OpenDialogl->Options>Clear();OpenDialogl->Options<<ofFileMustExist<<ofHidcRcadOnly<<ofNoChangeDir<<ofCreatePrompt;if(OpenDialogl->Execute()){cdtOpenFileNamez:OpenDialogl->FileName;TMsgDlgButtonsbuttons;buttons>>mbOK;}//?从文件中读取A矩阵

收藏

分享

举报
下载此文档