
- C++ Basics
- C++ Home
- C++ Overview
- C++ Environment Setup
- C++ Basic Syntax
- C++ Comments
- C++ Data Types
- C++ Variable Types
- C++ Variable Scope
- C++ Constants/Literals
- C++ Modifier Types
- C++ Storage Classes
- C++ Operators
- C++ Loop Types
- C++ Decision Making
- C++ Functions
- C++ Numbers
- C++ Arrays
- C++ Strings
- C++ Pointers
- C++ References
- C++ Date & Time
- C++ Basic Input/Output
- C++ Data Structures
- C++ Object Oriented
- C++ Classes & Objects
- C++ Inheritance
- C++ Overloading
- C++ Polymorphism
- C++ Abstraction
- C++ Encapsulation
- C++ Interfaces
Program to find N-th term of series 2, 12, 28, 50, 77, 112, 152, 198, …in C++
In this problem, we are given a number N. Our task is to create a program to find N-th term of series 2, 12, 28, 50, 77, 112, 152, 198, …in C++.
Problem Description − To find the N-th term of the series.
2, 12, 28, 50, 77, 112, 152, 198, ...N terms
We will find a general for the series.
Let’s take an example to understand the problem,
Input − N = 6
Output − 112
Solution Approach:
Here, the series is increasing in parabolic form, so the general term will be a quadratic equation.
So, the general formula for the series is
TN = 3*(N*N) + N - 2
Program to illustrate the working of our solution,
#include <iostream> using namespace std; int findNTerm(int N) { int nthTerm = ( (3*N*N) + N - 2); return nthTerm; } int main() { int N = 10; cout<<N<<"th term of the series is "<<findNTerm(N); return 0; }
Output:
10th term of the series is 308
- Related Articles
- Program to find N-th term of series 1, 2, 11, 12, 21… in C++
- Program to find N-th term of series 1, 3, 12, 60, 360...in C++
- Program to find N-th term of series 3, 12, 29, 54, 87, … in C++
- n-th term in series 2, 12, 36, 80, 150….in C++
- Program to find N-th term of series 0, 11, 28, 51, 79, 115, 156, 203, …In C++
- Program to find N-th term of series 4, 14, 28, 46, 68, 94, 124, 158, …..in C++
- C++ program to find n-th term of series 2, 10, 30, 68, 130 …
- Program to find N-th term of series 2, 4, 3, 4, 15… in C++
- C/C++ Program to Find the sum of Series with the n-th term as n^2 – (n-1)^2
- Program to find N-th term in the given series in C++
- Program to find N-th term of series 3, 12, 29, 54, 86, 128, 177, 234, ….. in C++
- Java Program to Find sum of Series with n-th term as n^2 – (n-1)^2
- Find sum of Series with n-th term as n^2 - (n-1)^2 in C++
- C/C++ Program to Find sum of Series with n-th term as n power of 2 - (n-1) power of 2
- Program to find N-th term of series 3, 6, 18, 24, … in C++

Advertisements