예제 #1
0
        public int getResultado()
        {
            if (n == 0)
            {
                return(1);
            }
            else
            {
                Fatorial f         = new Fatorial(n - 1);
                int      resultado = n * f.getResultado();

                if (resultado <= 0)
                {
                    throw new EstouroException(n);
                }

                return(resultado);
            }
        }