fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int i,x,x1=1;
  5. for(i=1;x<1000;i++){
  6. x=2*x1+1;
  7. x1=x;
  8. }printf("%d",i);
  9. }
  10.  
Success #stdin #stdout 0s 5312KB
stdin
Standard input is empty
stdout
10