Given a positive integer N, write a function to return a list of the first N fibonacci numbers in order. For example, if N=5, the output list is 0 1 1 2 3.
Sigiloso
int main() { int n = 0; cin >> n; int a = 1; int b = 1; int c = 1; if (n==1) { cout << a << endl; return 0; } cout << a << " "; while(n-- != 1) { cout << c << " "; a = b; b = c; c = a+b; } }