- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Program to find N-th term of series 1, 6, 17, 34, 56, 86, 121, 162, …in C++
In this tutorial, we will be discussing a program to find N-th term of series 1, 6, 17, 34, 56, 86, 121, 162, …
For this, we will be provided with a number. Our task is to find the term for the given series at that particular position.
Example
#include <iostream> #include <math.h> using namespace std; //calculating nth term of given series int nthTerm(int n) { return 3 * pow(n, 2) - 4 * n + 2; } int main() { int N = 4; cout << nthTerm(N) << endl; return 0; }
Output
34
- Related Articles
- Program to find N-th term of series 1, 6, 17, 34, 56, 86, 121, 162, …in C++
- n-th term of series 1, 17, 98, 354…… in C++
- C++ program to find n-th term of series 1, 3, 6, 10, 15, 21…
- Program to find N-th term of series 3, 12, 29, 54, 86, 128, 177, 234, ….. in C++
- Program to find N-th term of series 3, 6, 18, 24, … in C++
- Program to find N-th term of series 0, 0, 2, 1, 4, 2, 6, 3, 8…in C++
- 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 in the given series in C++
- C/C++ Program to Find the sum of Series with the n-th term as n^2 – (n-1)^2
- C++ program to find n-th term of series 1, 4, 27, 16, 125, 36, 343...
- Java Program to Find sum of Series with n-th term as n^2 – (n-1)^2
- Program to find N-th term of series 1 4 15 24 45 60 92... in C++
- 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
- C++ program to find n-th term in the series 7, 15, 32, …

Advertisements