Returning Index
Hi all,
I have a bit of a problem with a project and was hoping that somebody could help me out. Here goes!
I have a set of integers ie (1,-2,0,4,-5,0,7,-8,0,10) what I need to do is loop through and then return only the positive integers leaving out the negatives. This is easy enough but I have to return the index positions of the positive integers ie, (1,3,4,6,7,9,10). However I'm having major trouble with the logic because I need the integers in reverse order. What I get is the index integers from 1-7 not waht I need.
Can anybody help me out with this one. Many thanks in advance.
|