Write the program in C++ , to print the series 0,5,10,15,……50
Answers
Answered by
0
Answer:
Program to print the series 1, 3, 4, 8, 15, 27, 50… till N terms
Given a number N, the task is to print the first N terms of the following series:
1, 3, 4, 8, 15, 27, 50…
Examples:
Input: N = 7
Output: 1, 3, 4, 8, 15, 27, 50
Input: N = 3
Output: 1, 3, 4
From the given series we can find the formula for Nth term:
1st term = 1, 2nd term = 3, 3rd term = 4
4th term = 1st term + 2nd term + 3rd term
5th term = 2nd term + 3rd term + 4th term
6th term = 3rd term + 4th term + 5th term
Similar questions