public static void main(String[] args) {
int f[]=new int [11];
f[0]=1;
f[1]=1;
for (int i=2; i<f.length;i++){
f[i]=f[i-2]+f[i-1];
}
for (int i=0; i<f.length;i++){
System.out.println(f[i]);
}
}
}
Nessun commento:
Posta un commento