Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- long long n,E=0,i=1,p=1;
- cout<<"n=";cin>>n;
- while (i<=n)
- {
- p*=i;
- E+=p;
- i++;
- }
- cout<<"E="<<E;
- return 0;}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement