1234567891011121314
void fibonacci(int n,int t[100]) { int first=1,second=1,next=0; t[0]=first; t[1]=second; for(int i=2;i<=n;i++) { next=first+second; t[i]=next; first=second; second=next; } } //-----------------------------------------
fibonacci(n,t);