JustPaste.it

public static int SOD(int a ,int b)
{
// Assumption: a is bigger than b.
if(b<1)
return 0;

return a+ SOD(a,b-1);

}