counting odd numbers in a database?
Posted: Sat Jan 29, 2005 7:03 pm
Hi,
I have a database of numbers. I know how to check if it is an odd number. I just don't know how to check how many are in a row from the begining. I want to pull out odd numbers in a row and output how many are in a row till there is a even number. example:
45 - 67 - 71 - 10 - 23 - 44 3 in a row
note it will only pull out the first odd ones and stop completly so this would produce 0 in a row
10 - 29 - 2 - 99 - 37 0 in a row
this would produce the result 1
1 - 18 - 68- 29 - 82 1 in a row
I have tryed doing this for a while but i cant get it to work.
Alex
I have a database of numbers. I know how to check if it is an odd number. I just don't know how to check how many are in a row from the begining. I want to pull out odd numbers in a row and output how many are in a row till there is a even number. example:
45 - 67 - 71 - 10 - 23 - 44 3 in a row
note it will only pull out the first odd ones and stop completly so this would produce 0 in a row
10 - 29 - 2 - 99 - 37 0 in a row
this would produce the result 1
1 - 18 - 68- 29 - 82 1 in a row
I have tryed doing this for a while but i cant get it to work.
Alex