Translate the following natural language description of a loop into a for loop:
Declare a variable namedadof typelong, initialized to1. Then, untiladis greater than or equal tocim, multiplyadby2.
for (long ad = 1; ad > cim; ad *= 2) {
...
}
Something to double-check in your solution:
ad > cim)?Related puzzles: