i wanna write a program that gets the first number a seri and shows the other:like this
input:4
in this seri the next number comes form the number before it,if that is even
n/2.if that is odd n*3+1
the program have to show this 4 2 1
or this:
input 3:
3 10 5 16 8 4 2 1
i cannot fuiger out what's wrong with my code.
it just prints the last number(1)
any suggettions?