为什么这个打印1???它让我发疯。应该打印 1.01005016708
我正在使用bloodshed dev c ++进行编译
#include <iostream>
#include <cmath>
#include <algorithm>
using namespace std;
int main()
{
double rate = .05;
double time = (1/5);
double p = exp(rate*time);
cout<<p<<endl;
system("PAUSE");
return 0;
}