fork download
  1. #include<stdio.h>
  2. int main()
  3. {
  4. int n=0;
  5. int a=3;
  6. while(a<10000)
  7. {
  8. a=2*a-1;
  9. n=n+1; //
  10. }
  11. printf("初めて10000を超えるときは%dです\n",a);
  12. return 0;
  13. }
  14.  
  15.  
Success #stdin #stdout 0s 5312KB
stdin
Standard input is empty
stdout
初めて10000を超えるときは16385です