i = 1024 while(i > 0){ showln i i >>= 1 //also acceptable: i /= 2 }