fork download
  1. #include <stdio.h>
  2. int main(void)
  3. {
  4. int a;
  5. int b;
  6. a=0;
  7. b=0;
  8. do{
  9. b=b+1;
  10. a=a+b;
  11. }while(a<1000);
  12. printf("最後に足した数は%dです\n",b);
  13. return 0;
  14. }
  15.  
Success #stdin #stdout 0s 5280KB
stdin
Standard input is empty
stdout
最後に足した数は45です