#include <iostream> using namespace std; // we're going to calculate factorial from number int main(){ cout<<"Enter n\n"; // we ask people for N int n ;cin>>n; // 1*2*... n long long num=1; //for 1!+2!+3!+...+N! long long sum = 0; // we multiply 1 * 2 * 3 ... N for (int i = 1 ; i <= n ; i++){ num *= i; sum += num; } // out the answer cout<<"the answer is: "<<sum<<endl;
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments
Leave a comment