0

Hi.

I'm trying to create a program to compute the Riemann zeta function

which is defined as **1**+**(1/(2^x))**+**(1/(3^x))**+**(1/(4^x))**+....

for user input of x

and will keep adding as long as the term is less than (1e-7).

but I keep getting 1.79301e-307 for every number I put

```
#pragma hdrstop
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
#define limit 1e-7
cout<<"This program will compute the Riemann zeta function for real values of x>1."<<endl<<endl;
double number, sum, term;
char answer;
cout<<"Enter a value for x. ";
cin>>number;
cout<<"Do you want to continue?";
cin>>answer;
while(term > limit)
{
sum=0;
term=0;
int denominator=1;
term=(1/(pow(denominator,number)));
sum=sum+term;
denominator++;
}
cout<<sum;
}
```

help please!