package p4; public class M1 { public static void main(String[] args) { long f[]=new long[100]; f[0]=1; f[1]=2; for ( int i=2;i<f.length;i++) f[i]=f[i-1]+f[i-2]; for (int i=0;i<f.length;i++) System.out.println(i+"->"+f[i]+" "); System.out.println(); }
package p1; public class B1 { public static void main(String []args){ long f[]=new long [100]; f[0]=1; f[1]=2; for ( int i=2;i<f.length;i++) f[i]=f[i-1]+f[i-2]; for (int i=0;i<f.length;i++) System.out.println(i+"->"+f[i]+" "); System.out.println();
package p1; public class B1 { public static void main(String []args){ long f[]=new long [100]; f[0]=1; f[1]=2; for ( int i=2;i<f.length;i++) f[i]=f[i-1]+f[i-2]; for (int i=0;i<f.length;i++) System.out.println(i+"->"+f[i]+" "); System.out.println();
public class Fibonacci { public static void main(String[] args) { int n=100; long f[]=new long[n]; f[0]=1; f[1]=2; for(int i=2; i<f.length;i++){ f[i]=f[i-1]+f[i-2]; if (f[i]<=f[i-1]) {break;} System.out.println("f["+i+"]="+f[i]); } } }
public class Fibonacci { public static void main(String[] args) { int n=100; long f[]=new long[n]; f[0]=1; f[1]=2; for(int i=2; i<f.length;i++){ f[i]=f[i-1]+f[i-2]; if (f[i]<=f[i-1]) {break;} System.out.println("f["+i+"]="+f[i]); } } }
68 則留言:
public class A {
public static void main(String[] args)
{
long[] f = new long[100] ;
f[0] = 1;
f[1] = 2;
for(int i = 2; i < f.length; i++)
{f[i] = f[i-1] + f[i-2];}
for(int i = 0; i < f.length; i++)
{System.out.print(" "+f[i]);
System.out.println();}
}
}
package p1;
public class a1 {
public static void main(String[] args) {
{
long[] f = new long[100] ;
f[0] = 1; f[1] = 2;
for(int i = 2; i < f.length; i++)
{f[i] = f[i-1] + f[i-2];}
for(int i = 0; i < f.length; i++)
{System.out.print(" "+f[i]);
System.out.println();} }
}
}
package P1;
public class A1
{
public static void main(String[] args)
{
long[] f = new long[100] ;
f[0] = 1;
f[1] = 2;
for(int i = 2; i < f.length; i++)
{f[i] = f[i-1] + f[i-2];}
for(int i = 0; i < f.length; i++)
{System.out.print(" "+f[i]);
System.out.println();}
}
}
package P1;
public class A1
{
public static void main(String[] args)
{
long[] f = new long[100] ;
f[0] = 1;
f[1] = 2;
for(int i = 2; i < f.length; i++)
{f[i] = f[i-1] + f[i-2];}
for(int i = 0; i < f.length; i++)
{System.out.print(" "+f[i]);
System.out.println();}
}
}
package B9933057;
public class B9933057 {
public static void main(String[] args) {
long[] f = new long[100] ;
f[0] = 1;
f[1] = 2;
for(int i = 2; i < f.length; i++)
{f[i] = f[i-1] + f[i-2];}
for(int i = 0; i < f.length; i++)
{System.out.print(" "+f[i]);
System.out.println();}
}
}
package P1;
public class A1
{
public static void main(String[] args)
{
long[] f = new long[100] ;
f[0] = 1;
f[1] = 2;
for(int i = 2; i < f.length; i++)
{f[i] = f[i-1] + f[i-2];}
for(int i = 0; i < f.length; i++)
{System.out.print(" "+f[i]);
System.out.println();}
}
}
package P1;
public class A1 {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
{
long[] f = new long[100] ;
f[0] = 1;
f[1] = 2;
for(int i = 2; i < f.length; i++)
{f[i] = f[i-1] + f[i-2];}
for(int i = 0; i < f.length; i++)
{System.out.print(" "+f[i]);
System.out.println();}
}
}
}
package P1;
public class A1
{
public static void main(String[] args)
{
long[] f = new long[100] ;
f[0] = 1;
f[1] = 2;
for(int i = 2; i < f.length; i++)
{f[i] = f[i-1] + f[i-2];}
for(int i = 0; i < f.length; i++)
{System.out.print(" "+f[i]);
System.out.println();}
}
}
package P1;
public class A1
{
public static void main(String[] args)
{
long[] f = new long[100] ;
f[0] = 1;
f[1] = 2;
for(int i = 2; i < f.length; i++)
{f[i] = f[i-1] + f[i-2];}
for(int i = 0; i < f.length; i++)
{System.out.print(" "+f[i]);
System.out.println();}
}
}
package P1;
public class A1
{
public static void main(String[] args)
{
long[] f = new long[100] ;
f[0] = 1;
f[1] = 2;
for(int i = 2; i < f.length; i++)
{f[i] = f[i-1] + f[i-2];}
for(int i = 0; i < f.length; i++)
{System.out.print(" "+f[i]);
System.out.println();}
}
}
package P1;
public class A1
{
public static void main(String[] args)
{
long[] f = new long[100] ;
f[0] = 1;
f[1] = 2;
for(int i = 2; i < f.length; i++)
{f[i] = f[i-1] + f[i-2];}
for(int i = 0; i < f.length; i++)
{System.out.print(" "+f[i]);
System.out.println();}
}
}
public class B1 {
public static void main(String[] args) {
long[] f=new long[100];
f[0]=1;
f[1]=2;
for(int i=2; i<f.length;i++)
{
f[i]=(f[i-1]+f[i-2]);
System.out.println("f["+i+"]="+f[i]);
}
}
}
public class b9933014 {
public static void main(String[] args) {
long[] f = new long[100] ;
f[0] = 1;
f[1] = 2;
for(int i=2;i<f.length;i++)
{
f[i] = f[i-1] + f[i-2];
}
for(int i=0;i<f.length;i++)
{
System.out.print(" "+f[i]);
System.out.println();
}
}
}
package A2;
public class A1 {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
long[] f = new long[100] ;
f[0] = 1;
f[1] = 2;
for(int i = 2; i < f.length; i++)
{
f[i] = f[i-1] + f[i-2];
}
for(int i = 0; i < f.length; i++)
{
System.out.print(" "+f[i]);
System.out.println();
}
}
}
package P1;
public class B9933052A {
public static void main(String[] args) {
long [] f =new long[100];
f[0]=1;
f[1]=2;
for (int i=2;i<f.length;i++)
{
f[i]=f[i-1]+f[i-2];
System.out.println("f["+i+"]="+f[i]);
}
}
}
最大陣列值到f[90];
package P1;
public class A1
{
public static void main(String[] args)
{
long[] f = new long[100] ;
f[0] = 1;
f[1] = 2;
for(int i = 2; i < f.length; i++)
{f[i] = f[i-1] + f[i-2];}
for(int i = 0; i < f.length; i++)
{System.out.print(" "+f[i]);
System.out.println();}
}
public class B1 {
public static void main(String[] args) {
long[] f=new long[100];
f[0]=1;
f[1]=2;
for(int i=2; i<f.length;i++)
{
f[i]=(f[i-1]+f[i-2]);
System.out.println("f["+i+"]="+f[i]);
}
}
}
最大陣列值到f[90]
public class A1
{
public static void main(String[] args)
{
long[] f = new long[100] ;
f[0] = 1;
f[1] = 2;
for(int i = 2; i < f.length; i++)
{f[i] = f[i-1] + f[i-2];}
for(int i = 0; i < f.length; i++)
{System.out.print(" "+f[i]);
System.out.println();}
}
}
package A2;
public class A1 {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
long[] f = new long[100] ;
f[0] = 1;
f[1] = 2;
for(int i = 2; i < f.length; i++)
{
f[i] = f[i-1] + f[i-2];
}
for(int i = 0; i < f.length; i++)
{
System.out.print(" "+f[i]);
System.out.println();
}
}
}
package b9933024;
public class a1
{
public static void main(String[] args)
{
long[] f = new long[100] ;
f[0] = 1;
f[1] = 2;
for(int i = 2; i < f.length; i++)
{f[i] = f[i-1] + f[i-2];}
for(int i = 0; i < f.length; i++)
{System.out.print(" "+f[i]);
System.out.println();}
}
}
package p1;
public class a {
public static void main(String[] args) {
long[] f = new long[100] ;
f[0] = 1;
f[1] = 2;
for(int i = 2; i < f.length; i++)
{f[i] = f[i-1] + f[i-2];}
for(int i = 0; i < f.length; i++)
{System.out.print(" "+f[i]);
System.out.println();} }
}
package B9933040;public class B9933040 { public static void main(String[] args) { long[] f = new long[100] ; f[0] = 1; f[1] = 2; for(int i = 2; i < f.length; i++) {f[i] = f[i-1] + f[i-2];} for(int i = 0; i < f.length; i++) {System.out.print(" "+f[i]); System.out.println();} } }
package pack1;
import java.io.*;
public class A1 {
public static void main(String[] args) {
long[] f = new long[100] ;
f[0] = 1;
f[1] = 2;
for(int i = 2; i < f.length; i++)
{f[i] = f[i-1] + f[i-2];}
for(int i = 0; i < f.length; i++)
{System.out.print(" "+f[i]);
System.out.println();}
}
}
package B9933004;public class B9933004 { public static void main(String[] args) { long[] f = new long[100] ; f[0] = 1; f[1] = 2; for(int i = 2; i < f.length; i++) {f[i] = f[i-1] + f[i-2];} for(int i = 0; i < f.length; i++) {System.out.print(" "+f[i]); System.out.println();} } }
package pack1;
import java.io.*;
public class test1 {
public static void main(String[] args) {
long [] fib =new long[100];
fib[0]=1;
fib[1]=2;
for(int i=2;
i<fib.length;i++)
fib[i]=fib[i-1]+fib[i-2];
for(int i=0;
i<fib.length;i++)
System.out.println(i+"->"+fib[i]+" " );
System.out.println();
}
}
package B9933046;public class B9933046 { public static void main(String[] args) { long[] f = new long[100] ; f[0] = 1; f[1] = 2; for(int i = 2; i < f.length; i++) {f[i] = f[i-1] + f[i-2];} for(int i = 0; i < f.length; i++) {System.out.print(" "+f[i]); System.out.println();} } }
package pack1;
import java.io.*;
public class test1 {
public static void main(String[] args) {
long [] fib =new long[100];
fib[0]=1;
fib[1]=2;
for(int i=2;
i<fib.length;i++)
fib[i]=fib[i-1]+fib[i-2];
for(int i=0;
i<fib.length;i++)
System.out.println(i+"->"+fib[i]+" " );
System.out.println();
}
}
public class b9933011 {
public static void main(String[] args) {
long []f=new long[100];
f[0]=1;
f[1]=2;
for(int i=2;i<f.length;i++)
{
f[i]=(f[i-1]+f[i-2]);
System.out.println("f["+i+"]="+f[i]);
}
}
}
最大陣列數值 90
public class B41 {
public static void main(String[] args) {
long[] f=new long[100];
f[0]=1;
f[1]=2;
for(int i=2;i<f.length;i++)
{
f[i]=(f[i-1]+f[i-2]);
System.out.println("f["+i+"]="+f[i]);
}
}
}
最大陣列數值是90
package p1;
public class b1 {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
long[] f=new long[100];
f[0]=1;
f[1]=2;
for(int i=2; i<f.length; i++)
f[i]= f[i-1]+f[i-2];
for(int i=0; i<f.length; i++)
System.out.println(i+"->"+f[i]+" ");
System.out.println();
}
}
最大索引值=90
public static void main(String[] args)
{
long[] f = new long[100];
f[0] = 0;
f[1] = 1;
for(int i = 2; i < f.length; i++)
f[i] = f[i-1] + f[i-2];
for(long number : f)
System.out.print(number + " ");
System.out.println();
}
package pack1;
public class A1 {
public static void main(String[] args) {
long[] f=new long[100];
f[0]=1;
f[1]=2;
for(int i=2; i<f.length;i++)
{
f[i]=f[i-1]+f[i-2];
System.out.println("f["+i+"]="+f[i]);
}
}
}
最大值f[90];
long [] f=new long[100];
f[0]=1;
f[1]=2;
for(int i = 2; i <f.length; i++)
f[i] = f[i-1] + f[i-2];
for(int i = 0; i < f.length; i++)
System.out.print(f[i] + " ");
System.out.println();
package pack;
public class pack {
public static void main(String[] args) {
long [] f=new long[100];
f[0]=1;
f[1]=2;
for(int i=2; i<f.length; i++)
{
f[i]=f[i-1]+f[i-2];
System.out.println("f["+i+"]="+f[i]);
}
}
}
最大值f[90];
package pack1;
import java.io.*;
public class test1 {
public static void main(String[] args) {
long [] fib =new long[100];
fib[0]=1;
fib[1]=2;
for(int i=2;
i<fib.length;i++)
fib[i]=fib[i-1]+fib[i-2];
for(int i=0;
i<fib.length;i++)
System.out.println(i+"->"+fib[i]+" " );
System.out.println();
}
}
最大索引值=90
package pack1;
public class B1 {
public static void main(String[] args) {
long[] fib =new long[100];
fib[0] = 1;
fib[1] = 2;
for(int i = 2;
i < fib.length; i++)
fib[i] = fib[i-1] + fib[i-2];
for(int i = 0;
i < fib.length; i++)
System.out.println(i+"->"+fib[i] + " ");
System.out.println();
}
}
最大索引直:90
package pack1;
public class A1 {
public static void main(String[] args) {
long[] fib=new long[100];
fib[0]=1;
fib[1]=2;
for(int i=2;
i <fib.length;i++)
fib[i]=fib[i-1]+fib[i-2];
for(int i=0;
i <fib.length;i++)
System.out.println(i+"->"+fib[i]+" ");
System.out.println();
}
}
最大索引值=90
package p1;
public class p1 {
public static void main(String[] args) {
long []fib=new long [91];
fib[0]=1;
fib[1]=2;
for(int i=2; i<fib.length; i++ )
fib[i]=fib[i-1]+fib[i-2];
for(int i=0; i<fib.length; i++ )
System.out.println(i+"->"+fib[i]+" ");
System.out.println();
}
}
最大索引值:90
package p1;
public class b2 {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
long []fib=new long [91];
fib[0]=1;
fib[1]=2;
for(int i=2; i<fib.length; i++)
fib[i]=fib[i-1]+fib[i-2];
for(int i=0; i<fib.length; i++)
System.out.println(i+"->"+fib[i]+" ");
System.out.println();
}
}
最大索引值90
package a1;
public class a1 {
public static void main(String[] args) {
long[]f=new long[100];
f[0]=1;
f[1]=2;
for(int i = 2; i < f.length; i++)
f[i] = f[i-1] + f[i-2];
for(int i = 0; i < f.length; i++)
System.out.println("f"+i+"="+" "+f[i]);
System.out.println();
}
}
答案最大是F90
package p4;
public class M1 {
public static void main(String[] args) {
long f[]=new long[100];
f[0]=1;
f[1]=2;
for ( int i=2;i<f.length;i++)
f[i]=f[i-1]+f[i-2];
for (int i=0;i<f.length;i++)
System.out.println(i+"->"+f[i]+" ");
System.out.println();
}
}
package p1;
public class B1 {
public static void main(String []args){
long f[]=new long [100];
f[0]=1;
f[1]=2;
for ( int i=2;i<f.length;i++)
f[i]=f[i-1]+f[i-2];
for (int i=0;i<f.length;i++)
System.out.println(i+"->"+f[i]+" ");
System.out.println();
}
}
public class P1 {
public static void main(String[] args) {
long[]f=new long [100];
f[0]=1;
f[1]=2;
for(int i=2;i<f.length;i++)
f[i]=f[i-1]+f[i-2];
for(int i=0; i<f.length;i++)
System.out.println(i+" "+f[i]+" ");
System.out.println();
}
}
最大值:90
public static void main(String[] args) {
long[] f = new long[100] ;
f[0] = 1;
f[1] = 2;
for(int i = 2; i < f.length; i++)
{f[i] = f[i-1] + f[i-2];}
for(int i = 0; i < f.length; i++)
{System.out.print("f"+i+" "+f[i]);
System.out.println();}
}
}
最大值在90
package pack;
public class pack {
public static void main(String[]args) {
long [] f=new long[100];
f[0]=1;
f[1]=2;
for(int i=2; i<f.length; i++)
{
f[i]=f[i-1]+f[i-2];
System.out.println("f["+i+"]="+f[i]);
}
}
}
package p1;
public class p1 {
public static void main(String[] args) {
long []fib=new long [91];
fib[0]=1;
fib[1]=2;
for(int i=2; i<fib.length; i++ )
fib[i]=fib[i-1]+fib[i-2];
for(int i=0; i<fib.length; i++ )
System.out.println(i+"->"+fib[i]+" ");
System.out.println();
}
}
最大索引值:90
最大值=90
package C1;
public class C1 {
public static void main(String[] args) {
long[] f = new long[100] ;
f[0] = 1;
f[1] = 2;
for(int i = 2; i < f.length; i++)
{f[i] = f[i-1] + f[i-2];}
for(int i = 0; i < f.length; i++)
{System.out.print("f"+i+" "+f[i]);
System.out.println();}
}
}
90為最大值
package C1;
public class C1 {
public static void main(String[] args) {
long[] f = new long[100] ;
f[0] = 1;
f[1] = 2;
for(int i = 2; i < f.length; i++)
{f[i] = f[i-1] + f[i-2];}
for(int i = 0; i < f.length; i++)
{System.out.print("f"+i+" "+f[i]);
System.out.println();}
}
}
package p1;
public class a {
public static void main(String[] args) {
long[] f = new long[100] ;
f[0] = 1;
f[1] = 2;
for(int i = 2; i < f.length; i++)
{f[i] = f[i-1] + f[i-2];}
for(int i = 0; i < f.length; i++)
{System.out.print(" "+f[i]);
System.out.println();} }
}
最大索引值=90
最大值=90
package p1;
public class B1 {
public static void main(String []args){
long f[]=new long [100];
f[0]=1;
f[1]=2;
for ( int i=2;i<f.length;i++)
f[i]=f[i-1]+f[i-2];
for (int i=0;i<f.length;i++)
System.out.println(i+"->"+f[i]+" ");
System.out.println();
}
}
public class B1
{
public static void main(String[] args)
{
long[] f=new long[100];
f[0]=1;
f[1]=2;
for(int i = 2; i < f.length; i++)
f[i] = f[i-1] + f[i-2];
for(int i = 0; i < f.length; i++)
System.out.println("f"+i+"="+" "+f[i]);
System.out.println();
最大值是 f90
public class b9733054 {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
int i;
long f[]=new long[100];
f[0]=1;
f[1]=2;
for(i=2;i<f.length;i++){
f[i]=f[i-1]+f[i-2];
System.out.println("f["+i+"]="+f[i]);
}
}
}
/*索引最大值到90*/
package gan;
class gan{
public static void main(String[]args){
long[] f = new long[100];
f[0]=1;
f[1]=2;
for(int i = 2; i <f.length;i++) {
f[i] = f[i-1] + f[i-2];
}
for(int i = 0; i < f.length;i++) {
System.out.print("f"+i+ " "+f[i]);
System.out.println();
}
}
}
public class abcd {
public static void main(String[] args) {
long [] f=new long[100];
f[0]=1;
f[1]=2;
for (int i=2;i<f.length;i++)
{
f[i]=f[i-1]+f[i-2];
System.out.println("f["+i+"]"+f[i]);
}
}
}
*****第90個開始出錯*****
public class abc {
public static void main(String[] args)
{
long [] f=new long[100];
f[0]=1;
f[1]=2;
for(int i=2;i<f.length;i++)
{
f[i]=f[i-1]+f[i-2];
System.out.println("["+i+"]"+f[i]);
}
}
}
###到90行以前都是正確的,91行開始出錯出現負號###
package C1;
public class C2 {
public static void main(String[] args) {
⋯⋯
long[] f = new long[100] ;
f[0] = 1;
f[1] = 2;
for(int i = 2; i < f.length; i++)
{f[i] = f[i-1] + f[i-2];}
for(int i = 0; i < f.length; i++)
{System.out.print("f"+i+" "+f[i]);
System.out.println();}
}
}
package B9;
public class b9933016
{
public static void main(String[] args) {
long[] f = new long[100] ;
f[0] = 1;
f[1] = 2;
for(int i = 2; i < f.length; i++)
{f[i] = f[i-1] + f[i-2];}
for(int i = 0; i < f.length; i++)
{System.out.print("f"+i+" "+f[i]);
System.out.println();}
}
}
99
package B9;
public class b9933016
{
public static void main(String[] args) {
long[] f = new long[100] ;
f[0] = 1;
f[1] = 2;
for(int i = 2; i < f.length; i++)
{f[i] = f[i-1] + f[i-2];}
for(int i = 0; i < f.length; i++)
{System.out.print("f"+i+" "+f[i]);
System.out.println();}
}
}
89
package B9;
public class b9933016
{
public static void main(String[] args) {
long[] f = new long[100] ;
f[0] = 1;
f[1] = 2;
for(int i = 2; i < f.length; i++)
{f[i] = f[i-1] + f[i-2];}
for(int i = 0; i < f.length; i++)
{System.out.print(" "+f[i]);
System.out.println();}
}
}
public class Fibonacci
{
public static void main(String[] args)
{
int n=100;
long f[]=new long[n];
f[0]=1;
f[1]=2;
for(int i=2; i<f.length;i++){
f[i]=f[i-1]+f[i-2];
if (f[i]<=f[i-1])
{break;}
System.out.println("f["+i+"]="+f[i]);
}
}
}
public class Fibonacci {
public static void main(String[] args) {
int n=100;
long f[]=new long[n];
f[0]=1;
f[1]=2;
for(int i=2; i<f.length;i++){
f[i]=f[i-1]+f[i-2];
if (f[i]<=f[i-1])
{break;}
System.out.println("f["+i+"]="+f[i]);
}
}
}
public class d1 {
public static void main(String[] args) {
int n=100;
long f[]=new long[n];
f[0]=1;
f[1]=2;
for(int i=2; i<f.length;i++){
f[i]=f[i-1]+f[i-2];
if (f[i]<=f[i-1])
{break;}
System.out.println("f["+i+"]="+f[i]);
}
}
}
public class abcd {
public static void main(String[] args) {
long [] f=new long[100];
f[0]=1;
f[1]=2;
for (int i=2;i<f.length;i++)
{
f[i]=f[i-1]+f[i-2];
System.out.println("f["+i+"]"+f[i]);
}
}
}
public class abcd {
public static void main(String[] args) {
long [] f=new long[100];
f[0]=1;
f[1]=2;
for (int i=2;i<f.length;i++)
{
f[i]=f[i-1]+f[i-2];
System.out.println("f["+i+"]"+f[i]);
}
}
}
package P1;
public class A1
{
public static void main(String[] args)
{
long[] f = new long[100] ;
f[0] = 1;
f[1] = 2;
for(int i = 2; i < f.length; i++)
{f[i] = f[i-1] + f[i-2];}
for(int i = 0; i < f.length; i++)
{System.out.print(" "+f[i]);
System.out.println();}
}
}
public class A1
{
public static void main(String[] args)
{
long[] f=new long[100];
f[0]=1;
f[1]=2;
for(int i = 2; i < f.length; i++)
f[i] = f[i-1] + f[i-2];
for(int i = 0; i < f.length; i++)
System.out.println("f"+i+"="+" "+f[i]);
System.out.println();
最大值是 f90
package P1;
public class A1
{
public static void main(String[] args)
{
long[] f = new long[100] ;
f[0] = 1;
f[1] = 2;
for(int i = 2; i < f.length; i++)
{f[i] = f[i-1] + f[i-2];}
for(int i = 0; i < f.length; i++)
{System.out.print(" "+f[i]);
System.out.println();}
}
}
張貼留言