fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int multiplic(int m1, int m2){
  5. if(m2==0){
  6. return 0;
  7. }
  8. return m1 + multiplic(m1,m2-1);
  9. }
  10.  
  11. int main() {
  12. cout << multiplic(3, 5);
  13. return 0;
  14. }
Success #stdin #stdout 0s 15232KB
stdin
Standard input is empty
stdout
15