gammafunction.cpp
来自「何光渝所著《计算机常用数值算法与程序(C++版)》的随书源代码。 是想学习C+」· C++ 代码 · 共 26 行
CPP
26 行
//GammaFunction.cpp
//伽马函数
#include <iostream> //模板类输入输出流标准头文件
#include <SpecialFunction.h> //数学变换头文件
using namespace std; //名字空间
void main(void)
{
double x, y;
for(int i=1; i<11; i++)
{
x = 0.5 * i;
y = GammaFunction(x);
cout << "x = " << x << "\t GammaFunction(x) = " << y << endl;
}
cout << endl;
y = GammaFunction(1.5) * GammaFunction(2.5) / GammaFunction(4.0);
cout << "B(1.5,2.5) = " << y << endl;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?