This is probably something very basic, but I can't for the life of me think of how to get this to work.
What I need to do is prompt the user for a positive integer(n), then add n odd numbers together (eg: n=4; add 1+3+5+7 = 16)
I know I need to loop through 4 times: for(int i = 0; i < n; i++)
I can add up sequential numbers, just can't seem to get it right when I only need odd numbers.
I'm stuck on this problem, can someone help me with this?