Desafios

 

 

Assim que você terminar cada um dos problemas propostos abaixo, envie um email para jose#dc.ufscar.br (troque # por @) ou leve a solução nas reuniões da maratona.

 

1. Make a function

 

int factorial(int n) { ... }

 

in C/C++/Java that returns the factorial of a number. Don’t use while-do, do-while, for, switch, operator ?:, and if. Recursion is allowed. Don’t use Stirling formula to calcule the factorial.

 

2. Do the & operator of C/C++/Java using * and /. Easy, but labor intensive.