Find n | CPP program to find the n - th term in series 1 3 6 10 . . . ; Function to find nth term ; Driver code
#include <bits/stdc++.h> NEW_LINE using namespace std ; int term ( int n ) { return n * ( n + 1 ) / 2 ; } int main ( ) { int n = 4 ; cout << term ( n ) ; return 0 ; }