can someone please tell me how am i suppose to start my program ?

i have 20 integers (1-20) the user will input what number should start and the count interval . its a bit confusing

only 5 numbers should be left
numbers who are already counted will not be counted again

here's an example:
user chose to start in #4 then the counting interval is 3
chosen nos are :7 10 13 16 19

Recommended Answers

Your program only needs to print out the sequence?

Jump to Post

can you please give some more examples?

Jump to Post

All 5 Replies

Your program only needs to print out the sequence?

can you please give some more examples?

start counting from number 1 with a counting interval of 14

chosen nos are : 1 3 6 10 4

i should use queues and stacks right ? but i dont have much idea how to start

can someone please tell me how am i suppose to start my program ?

Open the editor in your IDE
Type in the program you designed to solve the problem.

That's how to start your program.

i have 20 integers (1-20) the user will input what number should start and the count interval . its a bit confusing

What's confusing about it? If we don't know why you are confused, how can we help you understand?

You need a FOR loop. Look it up.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.