public class C {
public static void main(String[] args) {
int i=1;
int j=1;
int t=0;
int a[]=new int [10];
a[0]=1;
a[1]=1;
for(int k=2;k<a.length;k++)
{
t=i+j;
a[k]=t;
i=j;
j=t;
}
for( i=0;i<a.length;i++)
{
System.out.print(a[i]+" ");
}
}
}
转载于:https://www.cnblogs.com/chaiweiwei/archive/2011/06/30/cww008.html