CS173: Intro to Computer Science - Iteration Revisited (3 Points)

Developed by Professor Tralie and Professor Mongan.

Exercise Goals

The goals of this exercise are:
  1. To use iteration to compute a discrete value
  2. To use conditionals to make choices during each loop iteration
Modify the ThreeXPlusOne.java file to solve the 3x+1 problem using a loop and conditional.
Welcome to our online modules system! Be sure to log in with your Urinus ID before you proceed. For example, Professor Tralie's ID is ctralie. If you are not an Ursinus student, that's fine! Just make something up, and you can still run everything

                    



Trivia

This problem is part of the Collatz Conjecture which suggests that any value will eventually converge back to 1 after a finite number of iterations. We don’t know if this is true!