[C++] Tính S(n) = 1 + 1.2 + 1.2.3 + ... + 1.2.3....N Ngôn ngữ: C++ Phần mềm: Visual Studio CODE: Select All #include <iostream>using namespace std;//Tính S(n) = 1 + 1.2 + 1.2.3 + ... + 1.2.3....Nint calSum(int N){ int S = 0; int T = 1; for (int i = 1; i <= N; i++) { T = T * i; S = S + T; } return S;}int main(){ int N = 0; cout << "Input N = "; cin >> N; int result = calSum(N); cout << "Result = " << result << endl; system("pause"); return 0;}