clang-tidy fixes for a49ec9b8d7

This commit is contained in:
github-actions
2020-08-16 19:29:11 +00:00
parent 629299b934
commit 518ff58483

View File

@@ -17,8 +17,9 @@
unsigned int fibonacci(unsigned int n) {
/* If the input is 0 or 1 just return the same
This will set the first 2 values of the sequence */
if (n <= 1)
if (n <= 1) {
return n;
}
/* Add the last 2 values of the sequence to get next */
return fibonacci(n - 1) + fibonacci(n - 2);
@@ -58,7 +59,7 @@ static void test() {
/// Main function
int main() {
test();
int n;
int n = 0;
std::cin >> n;
assert(n >= 0);
std::cout << "F(" << n << ")= " << fibonacci(n) << std::endl;