MCPcopy Create free account
hub / github.com/Apress/beginning-cpp20 / main

Function main

Exercises/Modules/Chapter 08/Soln8_07.cpp:10–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8unsigned long long fib(size_t n);
9
10int main()
11{
12 size_t num{};
13 std::cout << "Good day, master. How many Fibonacci numbers shall I compute today?" << std::endl;
14 std::cin >> num;
15
16 for (size_t i{1}; i <= num; ++i)
17 std::cout << "fib(" << i << ") = " << fib(i) << '\n';
18}
19
20unsigned long long fib(size_t n)
21{

Callers

nothing calls this directly

Calls 1

fibFunction · 0.70

Tested by

no test coverage detected