how do you make a sum?
here is the program. I try to make a sum of 1/(a+i)... i goes from 0 to 1000. and the program is supposed to plus all those terms together and print out the result.
#include iostream
using namespace std;
main(){
int a=1000000;
float b=0;
for (int i=0;i<=1000;i++)
b+=1/(a+i);
cout<<b;
return 0;
}