+ 1
How to make a dynamic array java program that displays the Fibonacci numbers
I hope you can help me with this.
1 Resposta
+ 1
public class Program
{
public static void main(String[] args) {
int f1, f2=0, f3=1;
for(int i=1;i<=10;i++){
System.out.print(" "+f3+" ");
f1 = f2;
f2 = f3;
f3 = f1 + f2;
}
}
}
do you want to store numbers in array, tell me I will do that