Write a fragment of code that will change the integer value stored in x as follows. If

Question:

Write a fragment of code that will change the integer value stored in x as follows. If x is even, divide x by 2. If x is odd, multiply x by 3 and subtract 1.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: