Bilangan Fibonacci
public class Fibonacci {
public static void main (String[] args ) {
int[] agk = new int[50];
agk[0] = 0;
agk[1] = 1;
int a = 0;
int b = 25;
while(a System.out.println(agk[a]);
agk[a+2]=agk[a]+agk[a+1];
a++;
}
}
}
Seja o primeiro a comentar
Posting Komentar