you want line 6 to be after line 7 (i.e. you want to get user input in the loop)
Although it will work, you may want to use different variable names for user input and value returned by collaz function
EDIT: or maybe I don't understand correctly? Check what the required output should be when even number. I have some recollections if x is even it should return x/2....
Although it will work, you may want to use different variable names for user input and value returned by collaz function
EDIT: or maybe I don't understand correctly? Check what the required output should be when even number. I have some recollections if x is even it should return x/2....
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs