I would like to make the following c statement in vb.
for(int i = 2^20; i > 0; i/=2)
{
printf("%d\n",i);
}
In vb it will look something like this:
For i As Integer = 2^32 to 0 Step /2
Console.Out.Writeline("{0}", i)
Next
In particular, the variable where I am divided by 2, each iteration is not legal vb.
Is there a way to write this with a For statement, which is allowed?
source
share