Skip to content
Sum of Odd numbers - Java
Profile icon
20rduncan

In my code, I have to take two numbers, such as 3 and 11, find the odd numbers between them (inclusive), add the odd numbers together and print the sum. I've looked up ways to do this and all the ways I've tried have given me a different result each time.
Can anyone help me figure out what I'm doing wrong?
https://repl.it/@20rduncan/035-Sum-Odds-in-Range

You are viewing a single comment. View All
Profile icon
20rduncan

Ah, I see what you mean. I feel kind of stupid I couldn't figure that out.
Thanks! :)