From the course: C Essential Training

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Challenge: Template factorial

Challenge: Template factorial - C Tutorial

From the course: C Essential Training

Challenge: Template factorial

(upbeat electronic music) - [Educator] For this challenge, you'll build on the chapter six challenge and build a template version of the non-recursive factorial function. Use your solution from chapter six as a basis and convert it to use a template. This was my solution for the chapter six challenge. You'll make a template function that will work with any numeric type. Expect this challenge to take about 10 to 15 minutes. Feel free to take longer if you want to experiment and learn.

Contents