Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main()
- {
- double e=0;
- int size= 20, j;
- for(j=0;j<size;j++)
- {
- int i;
- unsigned long long result=1;
- for(i=1 ; i<=j ; ++i)
- {
- result=result*i;
- }
- e=e+(1.0/result);
- cout<< e << endl;
- }
- cout<<e<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment