Computer Science, asked by sayanidassneha, 10 months ago

write a program to print the given series

3 6 12 24 48.............n terms​

Answers

Answered by Alyrock007
3

Answer:

the next term is 96

Explanation:

3x2=6

6x2=12

12x2=24

24x2=48

48x2=96

Answered by 22Aryan11111
2

Explanation:

Input : N = 5

Output : Sum = 33

Input : N = 20

Output : Sum = -1048575

//C++ program to find sum upto N term of the series:

// 3, -6, 12, -24, .....

#include<iostream>

#include<math.h>

using namespace std;

//calculate sum upto N term of series

class gfg

{

public:

int Sum_upto_nth_Term(int n)

{

return (1 - pow(-2, n));

}

};

// Driver code

int main()

{

gfg g;

int N = 5;

cout<<g.Sum_upto_nth_Term(N);

}

Similar questions