if you enter n=6, this code returns 719
int main()
{
long n,k;
cin>>n;
k = tgamma(n+1);
cout<<k;
}
while this code below will return correct answer 720
int main()
{
long n,k;
n=6;
k = tgamma(n+1);
cout<<k;
}
why is this happening?
Aucun commentaire:
Enregistrer un commentaire