Title: Help
Alguém sabe qual o valor retornado da seguinte função:
 
public int func (int a, int b)
{
    if (b == 1)
        return a;
    else
        return a + func (a, b - 1)
}
 
Assumam valores de a = 1 e b = 2. Se possível, expliquem como vcs conseguiram chegar a alguma solução.

Responder a