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