fork(1) download
  1.  
  2.  
  3. #include <stdio.h>
  4.  
  5. int main() {
  6. {
  7. int i,j,a;
  8. scanf("%d",&i);
  9. scanf("%d",&j);
  10.  
  11. if(i<j)
  12. for(i=i; i<=j; i++) {
  13.  
  14. a=a+i;
  15. printf("%d",a);
  16. }
  17.  
  18.  
  19.  
  20. else
  21. for(j=j; j<=i; j++) {
  22.  
  23. a=a+j;
  24. printf("%d",a);
  25. }
  26.  
  27. }
  28. return 0;
  29. }
  30.  
Success #stdin #stdout 0s 5304KB
stdin
8
2
stdout
25914202735