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