Well, there is a way without loops, but I'll leave that for you to see.
You code will look like
1 2 3 4 5 6 7
int term, n, i = 1, sum=0;
cin >> n;
do{
/*calculate term using i*/
i++;
sum += term;
}while(term < n);
If you don't see how to calculate term, draw yourself a table of values of i and term. It's really simple. While doing it, you'll probably need to check if i is odd or even. You do that by checking the remainder or division by two : if (i%2 == 0) //i is even .