fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. // your code goes here
  5. int a=3,b=0;
  6. do
  7. {
  8. a=a*2-1;
  9. b=b+1;
  10. }
  11. while(a<=10000);
  12.  
  13. printf("%d番目に値は%dとなり10000を越す。",b,a);
  14. return 0;
  15. }
  16.  
Success #stdin #stdout 0.01s 5280KB
stdin
Standard input is empty
stdout
13番目に値は16385となり10000を越す。