[prev] 16 [next]

Exercise #2: Using scanf

Write a program that
  • asks the user for a number
  • checks that it is positive
  • applies Collatz's process (Exercise 3, Problem Set Week 1) to the number