Answer to Question choice-1

Using an if-statement:
  if(n % 2 == 1)
  {
    m = 3*n + 1;
  }
  else
  {
    m = n/2;
  }

Using a conditional expression:

  m = (n % 2 == 1) ? 3*n + 1 : n/2;