We have an unspoken rule here that we don't do homework or assignments for you. If you can show us what you've done so far, we can help you with specific things, but we won't do it all. If you have no clue where to even start, say that and I will tell you like an outline, or say how you could do that. You have to do most of it yourself though.
We have an unspoken rule here that we don't do homework or assignments for you
It's actually not unspoken:
forum rules wrote:
Don't post homework questions
Programmers are good at spotting homework questions; most of us have done them ourselves. Those questions are for you to work out, so that you will learn from the experience. It is OK to ask for hints, but not for entire solutions.
On that note:
Your program will first have to:
*declare a variable (n) to accept user input
*ask the user for a number and store it in said variable n
*for n times, print out the next odd number, being the previous number +2, starting from 1
With that in mind, give it your best shot and get back to us if you run into any trouble.