)/2]-a[(n+1)/2]*x[(n+3)/2])/d[(n+1)/2];Р}Р九、源程序如下:Р//*****************张争******学号0910190161**********Р#include<iostream.h>Р#define N 10000Рint n;Рint a[N],b[N],d[N],x[N];Рvoid input()Р{Р?int i;Р?cout<<"请输入方程组的阶数:";Р?cin>>n;Р?cout<<"请输入方程组的系数:"<<endl;Р?for(i=1;i<=n;i++)Р?{Р cout<<"d"<<i<<"=";Р cin>>d[i];Р cout<<"b"<<i<<"=";Р cin>>b[i];Р?}Р?for(i=1;i<n;i++)Р?{Р cout<<"a"<<i<<"=";Р cin>>a[i];Р?}Р}Рvoid jiefangcheng()Р{Р?int i;Р?x[1]=b[1]/d[1];Р?for(i=2;i<(i+1)/2;i++)Р x[i]=(b[i]-a[i-1]*x[i-1])/d[i];Р?x[n]=b[n]/d[n];Р?for(i=n-1;i>(i+1)/2;i--)Р x[i]=(b[i]-a[i]*x[i+1])/d[i];Р?x[(n+1)/2]=(a[(n-1)/2]*x[(n-1)/2]-a[(n+1)/2]*x[(n+3)/2])/d[(n+1)/2];Р}Рvoid output()Р{ int i;Р cout<<"方程组的解为:"<<endl;Р?for(i=1;i<=n;i++)Р cout<<"x"<<i<<"="<<x[i]<<endl;Р}Рvoid main()Р{Р?input();Р?jiefangcheng();Р?output();Р}