#include <stdio.h> int main(void) { int a=1, n=0; do { a=a*2; n = n + 1; } while( a<=10000 ); return 0; }
Standard input is empty
2^0 = 1 2^1 = 2 2^2 = 4 2^3 = 8 2^4 = 16 2^5 = 32 2^6 = 64 2^7 = 128 2^8 = 256 2^9 = 512 2^10 = 1024 2^11 = 2048 2^12 = 4096 2^13 = 8192 2の 14 乗で初めて10000を超えます