/* Print powers of 2 <= 1500 */ #include int main() { int i; i = 1; /* 2^0 */ while (i <= 1500) { printf("%d\n", i); i = i * 2; } return 0; }