Find sum of N | C ++ program to find sum in Nth group ; calculate sum of Nth group ; Driver code
#include <bits/stdc++.h> NEW_LINE using namespace std ; int nth_group ( int n ) { return n * ( 2 * pow ( n , 2 ) + 1 ) ; } int main ( ) { int N = 5 ; cout << nth_group ( N ) ; return 0 ; }