title: Nth Pentagonal Number
signature: function nth_pentagonal_number(n)
test_code: using Printf
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  function validate_solution(actual, expected)
      return abs(actual - expected) < 1e-06
  end
  
  function driver(n, expected)
      try
  
          if validate_solution(PLACEHOLDER_FN_NAME(n), expected)
              return "PASSED";
          end
          return "FAILED";
      catch exception_obj
          return string(Base.typename(typeof(exception_obj)).wrapper);
      end
  end
  
  function main()
      
      result = driver(96, 13776.0);
      @printf("TEST-0...%s\n",result);
      
      result = driver(93, 12927.0);
      @printf("TEST-1...%s\n",result);
      
      result = driver(15, 330.0);
      @printf("TEST-2...%s\n",result);
      
      result = driver(8, 92.0);
      @printf("TEST-3...%s\n",result);
      
      result = driver(21, 651.0);
      @printf("TEST-4...%s\n",result);
      
      result = driver(14, 287.0);
      @printf("TEST-5...%s\n",result);
      
      result = driver(11, 176.0);
      @printf("TEST-6...%s\n",result);
      
      result = driver(79, 9322.0);
      @printf("TEST-7...%s\n",result);
      
      result = driver(24, 852.0);
      @printf("TEST-8...%s\n",result);
      
      result = driver(94, 13207.0);
      @printf("TEST-9...%s\n",result);
      
  end
  
  main()
source_py: def nth_pentagonal_number(n):
      return ((((3 * n) * n) - n) / 2)
source_cpp: int nth_pentagonal_number(int n) {
    return ( 3 * n * n - n ) / 2;
  }