please find the answere..1. Let n be any natural number (n > 0). 2. If n is odd, triple it and add 1 (n = 3n + 1). 3. If n is even divide it in half (n = n/2). 4. Stop if n = 1, otherwise go back to step 2. Does the above process always terminate (end with n = 1) for any starting value of n?
--
Thanks
ali hyder md maruf
No comments:
Post a Comment