fixed code for lint and copy constructor

This commit is contained in:
Krishna Vedala
2020-05-26 18:07:41 -04:00
parent 251c32d8b3
commit c892cbadc6
2 changed files with 244 additions and 233 deletions

View File

@@ -18,11 +18,12 @@ large_number fib(uint64_t n) {
large_number f1(1);
do {
large_number f2 = f0 + f1;
f0 = f1;
f1 = f2;
large_number f2 = f1;
f1 += f0;
f0 = f2;
n--;
} while (n > 2); // since we start from 2
return f1;
}