?? 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 + -