00:01
For this problem, we will first have to initialize our summation.
00:07
I'll just say total equals 0, and int counter is also equals to 0.
00:19
So when we have these two variables, we can say while counter is less than 100, and then open curly braces, and then we move on with the rest of the code.
00:35
Want to make sure that it's odd.
00:38
So for that, we can say if counter modulo, because we're talking about odd numbers, so we can say two, and that cannot be or should be one.
01:02
And if that's the case, and that's a one, by the way.
01:08
If that is the case, we add that to the total.
01:11
So total is equal to total plus counter.
01:19
And it's always a good idea to have these curly braces, even though if it's a one -liner after an if statement...