#include <stdio.h> int main(void) { int i,x,x1=1; for(i=1;x<1000;i++){ x=2*x1+1; x1=x; }printf("%d",i);}
Standard input is empty
10
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!