Friday, April 13, 2007

CSE 110 - LAB 4

start=int(raw_input("Please enter a starting value: "))
value=start
while value>1:
print value
if (value%2)==0:
value=value/2
else:
value=3*value+1
print value

No comments: