fork download
  1. #include<stdio.h>
  2. #include<math.h>
  3. int main()
  4. {
  5. int i,s;
  6. s=0;
  7. do
  8. {
  9. s=s+i;
  10. printf("%d",s);
  11. i++;
  12. }
  13. while(i<=10);
  14. return 0;
  15. }
Success #stdin #stdout 0s 5388KB
stdin
4
stdout
012345678910