Tính S(N) = 1 + 2 + 3 + ... + N Ngôn ngữ C++. Phần mềm Visual Studio CODE: Select All #include <iostream>using namespace std;int calSum(int N){ int S = 0; for (int i = 1; i <= N; i++) { S += i; } return S;}// Code C++ share by website CnttQN.Comint main(){ int N = 0; cout << "Input N = "; cin >> N; int result = calSum(N); cout << "Sum = " << result << endl; system("pause"); return 0;}