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