
- 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
n-th term in series 2, 12, 36, 80, 150….in C++
The given series is 2, 12, 36, 80, 150...
If you clearly observe the series, you will find that the n-th number is n2 + n3.
Algorithm
- Initialise the number N.
- Use the series formula to compute the n-th term.
- Print the result.
Implementation
Following is the implementation of the above algorithm in C++
#include <bits/stdc++.h> using namespace std; int getNthTerm(int n) { return (n * n) + (n * n * n); } int main() { int n = 7; cout << getNthTerm(n) << endl; return 0; }
Output
If you run the above code, then you will get the following result.
392
- Related Articles
- Program to find N-th term of series 1, 2, 11, 12, 21… in C++
- Find sum of Series with n-th term as n^2 - (n-1)^2 in C++
- Program to find N-th term of series 2, 12, 28, 50, 77, 112, 152, 198, …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++
- Program to find N-th term of series 0, 10, 30, 60, 99, 150, 210, 280...in C++
- C++ program to find n-th term of series 1, 4, 27, 16, 125, 36, 343...
- C++ Programe to find n-th term in series 1 2 2 3 3 3 4
- n-th term of series 1, 17, 98, 354…… in C++
- Program to find N-th term in the given series in C++
- Program to find N-th term of series 2, 4, 3, 4, 15… in C++
- Program to find N-th term of series 3, 12, 29, 54, 86, 128, 177, 234, ….. in C++
- C/C++ Program to Find the sum of Series with the n-th term as n^2 – (n-1)^2
- N-th term in the series 1, 11, 55, 239, 991,…in C++
- C Program for N-th term of Geometric Progression series

Advertisements