I'm learning recursion in C, and I was able to do some programming using recursion. However, I'm picking up to make a simple program that the user sending two numbers, example: 6x2, I multiply them in recursion. I may even show you the code below, but I'm sure it escapes entirely from the reality of the actual code.
Code:
#include <stdio.h>
int poligono(int n,int v){
int res=0;
if(v==0)
return 0;
else if(n==0)
return n;
else
return n + poligono(n,v);
}
int main(){
int n,v,res=0;
scanf("%d%d",&n,&v);
res=poligono(n,v);
printf("Res = %d\n",res);
return 0;
}