subject
Engineering, 20.02.2020 18:03 chandranewlon

Question 2(5pt): Print Collatz sequence The Collatz conjecture defines a sequence as follows: if n is an even number, then the next value is n/2. If n is odd, then the next value is 3n 1. The sequence is conjectured to always reach 1 regardless of the starting number. Write a program that takes a starting number n and prints the entire sequence, starting with n and ending with 1. Each number should be printed on a new line.

ansver
Answers: 1

Another question on Engineering

question
Engineering, 03.07.2019 14:10
Line joining liquid phase with liquid and solid phase mixture is known as: a) liquidus b) solidus c) tie line d) none of the mentioned
Answers: 2
question
Engineering, 04.07.2019 18:10
During a steady flow process, the change of energy with respect to time is zero. a)- true b)- false
Answers: 2
question
Engineering, 06.07.2019 03:20
What is the maximum height from which a mass of 30 kg can fall on to a flange on the lower end of a vertical rod of length 1.0 m and diameter 20 mm, the upper end being rigidly fixed, if the stress in the rod is not to exceed 80 mpa? the tensile modulus of the rod is 200 gpa.
Answers: 3
question
Engineering, 06.07.2019 04:20
Assume that you are asked to perform a boring operation on a large-diameter hollow workpiece. would you use a horizontal or a vertical boring mill?
Answers: 3
You know the right answer?
Question 2(5pt): Print Collatz sequence The Collatz conjecture defines a sequence as follows: if n i...
Questions
question
Chemistry, 31.10.2019 21:31
question
Mathematics, 31.10.2019 21:31