Skip to main content
deleted 188 characters in body
Source Link
Jamal
  • 34.9k
  • 13
  • 133
  • 237
  • Those comment headers seem distracting and don't add anything of value. I'd just remove them.

  • recursive_factorial() can also use a ternary statement:

      double recursive_factorial(double n) {
          return (n < 1) ? 1 : n * recursive_factorial(n-1);
      }
    
  • An unformatted output can be done with puts() instead of printf().

  • Those comment headers seem distracting and don't add anything of value. I'd just remove them.

  • recursive_factorial() can also use a ternary statement:

      double recursive_factorial(double n) {
          return (n < 1) ? 1 : n * recursive_factorial(n-1);
      }
    
  • An unformatted output can be done with puts() instead of printf().

  • Those comment headers seem distracting and don't add anything of value. I'd just remove them.

  • An unformatted output can be done with puts() instead of printf().

Source Link
Jamal
  • 34.9k
  • 13
  • 133
  • 237

  • Those comment headers seem distracting and don't add anything of value. I'd just remove them.

  • recursive_factorial() can also use a ternary statement:

      double recursive_factorial(double n) {
          return (n < 1) ? 1 : n * recursive_factorial(n-1);
      }
    
  • An unformatted output can be done with puts() instead of printf().