fork download
  1. #include <stdio.h>
  2. int fuga (int x,int y){
  3. int i,a;
  4. int sum=0;
  5. for(i=1;i<=y;i++){
  6. a=x*i;
  7. sum=+a;
  8. }
  9. return sum;
  10. }
  11.  
  12. int main() {
  13. // your code goes here
  14.  
  15. printf("%d",fuga(2,3));
  16. return 0;
  17. }
  18.  
Success #stdin #stdout 0s 5332KB
stdin
2
3
stdout
6