Thread: Returning Index
View Single Post
Old Dec 10th, 2007, 1:52 AM   #1
littlejim4
Newbie
 
Join Date: Dec 2007
Location: South Wales
Posts: 4
Rep Power: 0 littlejim4 is on a distinguished road
Unhappy 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.
littlejim4 is offline   Reply With Quote