fork download
  1. #include <stdio.h>
  2. int sum(int m, int n){
  3. if(m>=n){
  4. return 0;
  5. }else{
  6. return m+sum(m+1,n);
  7. }
  8. }
  9. int main(void) {
  10. int a,b;
  11. int result=sum(a,b);
  12. scanf("%d%d",&a,&b);
  13. printf("%d",sum(a,b));
  14. return 0;
  15. }
  16.  
Success #stdin #stdout 0.01s 5284KB
stdin
Standard input is empty
stdout
Standard output is empty