Guest User

Untitled

a guest
Jan 23rd, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. x=int(raw_input('ingrese numero entero: '))
  2. print x,
  3. while x!=1:
  4. while x%2==0 and x!=1:
  5. x=x/2
  6. print x,
  7. while x%2!=0 and x!=1:
  8. x=(x*3)+1
  9. print x,
Add Comment
Please, Sign In to add comment