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