int i = 1024; while(i > 0){ System.Console.WriteLine(i); i /= 2; }