fork download
  1. #include <stdio.h>
  2. int main()
  3. {
  4. int x,n;
  5. x=1;
  6. n=1;
  7.  
  8. while(x<1000){
  9. x=x*2+1;
  10. n++;
  11. }
  12. printf("%d\n",n);
  13. }
  14.  
Success #stdin #stdout 0.01s 5320KB
stdin
Standard input is empty
stdout
10