Hi, new to the forum but I have read and understand u guys aren't here to do this for me and I know that and want to learn how to do this.
My goal is to write a program that to compute the following sum: 1+2*3+3*4*5+4*5*6*7+5*6*7*8*9+6*7*8*9*10*11+...+n* (n+1)*(n+2)*...*(2n-1)
Now me and some people figured this to be the same thing as
here is what I have come up with so far but I am sure it's not correct any tips, suggestions, or constructive criticism is welcomed.
I know this isnt right b/c if n = 3 the answer output from the program should be 67 b/c
using namespace std;
int k, n, total=0, sum=0;
cout << "Enter a whole number: \n";
cin >> n;
k = n;
sum = k * ++k;
k = --n;
cout << "The answer to the equation for your number is ";
cout << total << endl;
(5!/2!) + (3!/1!) + (1!/0!) = 67 but I get 72 when I run the program.
Thanks and sorry for the long post, me and my friends are just noobs trying to learn from mistakes.