Hi all I just started writing my first while/for/do loop and I have this assignment to calculate a user input into printing out a value. I know that seems uber vague so here is a better description:
The user inputs a value n between starting with two then I output the sum of n odd integers. So if they enter 3 then the output should be 9.
1+3+5 and what I am having trouble with is how to tell the loop when to stop. I mean I set the user input to the variable say 3 and then do I set the number of times the loop runs to another variable and then have the loop break when these two variables are equal? I am very very lost. Please help a girl out I haven't been this confused since I watched the ending of Evangelion!
