📄 d4r09.cpp
字号:
#include <iostream.h>
#include <math.h>
#include <iomanip.h>
#include <stdlib.h>
#include <fstream.h>
#include <string>
void main()
{
//program d4r9
//driver for routine gcf
int i;
char text[20];
double w,z,value,gammcf,gln,nval;
const double pi = 3.1415926;
fstream fin;
fin.open("d:\\vc常用数值算法集\\data\\fncval.dat",ios::in);
while (strcmp(text,"Incomplete")!=0)
{
fin>>text;
}
fin>>text;
fin>>text;
fin>>nval;
cout<<"Incomplete Gamma Function "<<endl;
fin>>text;
cout<<endl;
cout<<" a x actual gcf(a,x) gammln(a) gln"<<endl;
for( i = 1;i<=nval;i++)
{
fin>>w;
fin>>z;
fin>>value;
if( z >= w + 1)
{
gcf(gammcf, w, z, gln);
cout<<setw(4)<<w;
cout<<setw(11)<<z;
cout<<setw(12)<<1-value;
cout<<setw(14)<<gammcf;
cout<<setw(15)<<gammln(w);
cout<<setw(15)<<gln<<endl;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -