29.01.2014, 00:04
You can do that in one very short line.
id = i/2
I guess i is an integer. Dividing one integer by another one will cut off any decimal digits. 6/2=3, 3/2=1, 1/2=0 and so on.
id = i/2
I guess i is an integer. Dividing one integer by another one will cut off any decimal digits. 6/2=3, 3/2=1, 1/2=0 and so on.