#include "library.h" void prefill_with_answers(int A[], const int size) { A[1] = 1; A[2] = 1; int x = 3; while (x < size) { A[x] = A[x-1] + A[x-2]; x = x + 1; } } void main() { const int limit = 50; int fibs[limit]; prefill_with_answers(fibs, limit); int x = 1; while (x < limit) { cout << "fib(" << x << ") = " << fibs[x] << "\n"; x = x + 1; } }