From the course: Introducing Functional Programming in C++

Unlock the full course today

Join today to access over 22,700 courses taught by industry experts or purchase this course individually.

Challenge: Fibonacci generator

Challenge: Fibonacci generator - C++ Tutorial

From the course: Introducing Functional Programming in C++

Start my 1-month free trial

Challenge: Fibonacci generator

(techno sound effects) - [Instructor] Are you up to test your skills with a little challenge? Use template metaprogramming to create a function to generate the Fibonacci series. The series begins with zero, one, one, two. The next number in the series is the sum of the last two. You'll want specializations for the numbers zero and one. Give yourself five or 10 minutes to complete this challenge.

Contents