fix: Use #define

This commit is contained in:
Panquesito7 2020-06-23 17:53:20 -05:00
parent cea644bdc3
commit da18b90498
No known key found for this signature in database
GPG Key ID: 3C482B03FD220E68

View File

@ -19,12 +19,15 @@
#include <cstdio>
#include <iostream>
/**
* maximum number that can be computed - The result after 93 cannot be stored
* in a `uint64_t` data type.
*/
#define MAX 93
/** Algorithm */
uint64_t fib(uint64_t n) {
// maximum number that can be computed - The result after 93 cannot be stored
// in a `uint64_t` data type.
static const uint64_t MAX = 93;
// Array of computed fibonacci numbers */
static uint64_t numbers[MAX] = {0};