#include int main() { long n, j, total; cout << "Enter number: "; cin >> n; total = 0; for (j = 1; j<=n; j++) { total += j; } cout << "The sum of the first " << n << " numbers is " << total << endl; cout << "Computed by the formula: " << n*(n+1)/2 << endl; }