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