Advertisement
roneygomes

Recursividade 1

Dec 8th, 2011
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.23 KB | None | 0 0
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3.  
  4. def contador(j):
  5.     if j == 0:
  6.         print "Fogo!"
  7.     else:
  8.         print j
  9.         contador(j - 1)
  10.  
  11. limite = int(raw_input("Entre com um valor inteiro: "))
  12. contador(limite)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement