Java计算斐波那契数列 斐波那契数列 int n1=0,n2=1,n3=0;int n=30;for(int i=3;i<=n;i++){ n3 = n2+n1; n1 = n2; n2 = n3;}System.out.println(n3);