Fibonacci numbers with Function array

How can we use array function for Fibonacci?
I want to dynamically increase the Array by adding
the next Fibonacci numbers. I need to use Processing Array Function
and rewrite function fibNumber with integer array fibNums.

int	num	=	1000000;	
void	setup(){	
		noLoop();	
}	
void	draw(){	
		fibNumber(0,	1,	num);	
}	
void	fibNumber(int	x0,	int	x1,	int	num){	
		if(x1	<	num){	
				//println(x0+x1);	
fibNumber(x1,	x0+x1,	num);	
				//println(x0+x1);	
		}	
}

Please clarify your question. I’m mostly confused by this line:

Because you haven’t initialized an array called fibNums yet. Can I ask if this is for a class or something?

this is for my assignment for class.

This is my code , please help me to edit it.


int [] fibNum;

void  setup() {  
  size(400, 400);  
  noStroke();  
  smooth();  
  noLoop();  

  background(204); 
  fibNum = new int[width];
}
void  draw() {  
  background(204);  
  for (int  i  = 0; i  <fibNum.length-1; i++) {      
    fibNum[i+1]  = fibNum[i]+ fibNum[0];
  }



  PrintfibNum[i];

Do you understand the differences between the draw() and setup() functions?