fork(1) download
  1. #include <stdio.h>
  2.  
  3. int main() {
  4. int n = 0;
  5. int total = 0;
  6.  
  7. do {
  8. n = n + 1;
  9. total = total + n;
  10. } while (total <= 1000);
  11. printf("%d",n);
  12. return 0;
  13. }
  14.  
Success #stdin #stdout 0s 5316KB
stdin
Standard input is empty
stdout
45