fork download
  1. #include <stdio.h>
  2. int hoge(int n, int m){
  3. int i,y=0;
  4. for(i=n;i<=m;i++){
  5. printf("%d",i);
  6. if(i<m)
  7. printf("+");
  8. else
  9. printf("=");
  10. y=y+i;}
  11. return y;
  12. }
  13.  
  14. int main(){
  15. printf("%d",hoge(4,8));
  16. return(0);
  17. }
Success #stdin #stdout 0s 5320KB
stdin
Standard input is empty
stdout
4+5+6+7+8=30