0

What I want to know is, if it's possible to create a countdown in c, BUT have a condition for when it hits an "unsual" piece of data in the array. I'll explain better with examples.

This is also similar to: Read ahead in an array to predict later outcomes in C

however, it was poorly worded. So, I am rewording this question.

Ex: The array is an integer array with : 0 0 0 0 1 0 0 0 0 0 0 0 0 0 5 0 0 0 0 0 2

So, when its zero, don't do anything. However, when it's non-zero, display the text associated with the number (according to some condition).

With pseudocode it'd be something like this:

if 0 dont do anything    ====>   within this countdown till next non-zero
if != 0 then display text asociated
reset countdown till next non-zero.

Is there any way this can be achieved? Basically, this would mean you could predict or read ahead in the array. Any help would really be appreciated!

Community
  • 1
  • 1

0 Answers0