Advertisement
Guest User

Untitled

a guest
Sep 15th, 2014
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. float funcao (int indice_termo)
  2. {
  3. if (indice_termo == 1)
  4. {
  5. return 1;
  6. }
  7.  
  8. int novo_indice_termo = indice_termo--;
  9. float termo = 1/indice_termo;
  10.  
  11. return (termo + funcao(novo_indice_termo));
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement