Find sum of the series ? 3 + ? 12 + ... ... ... upto N terms | C ++ implementation of above approach ; Function to find the sum ; Apply AP formula ; Driver code ; number of terms
#include <bits/stdc++.h> NEW_LINE #define ll  long long int NEW_LINE using namespace std ; double findSum ( ll n ) { return sqrt ( 3 ) * ( n * ( n + 1 ) / 2 ) ; } int main ( ) { ll n = 10 ; cout << findSum ( n ) << endl ; return 0 ; }