0
Help me :)
1. Write a program that will ask the user a number. 1a. Number should be greater than 20 and less than 100,000. The program should warn the user if this restriction is violated and should ask again. 1b. Non-number inputs should not result into program crashing. 2. If the number is even, the program should divide it by 2. If the number is odd, multiply it by 3 and add 1. 3. The program will repeat this again with the resulting quotient or sum, and will repeat again until the number becomes 1. 4. All quotients or sums should be displayed. 5. All numbers, including the one entered by the user, should be added in a list. 6. At the end of the computation, the program will display this list of numbers.
2 Respostas
+ 3
What did you try so far and where did you get stuck?
+ 1
I recommend use only 10 fingers, more fingers is overkill.