/**
* Print first 10 Fibonacci numbers.
* --The sequence has been used in the design of a building
* -- Used in Sprint Planning in Agile Practice
*
*/
public class TestFibonacci
{
public static void main(String[] args) {
int fib = 0, nextFib = 1;
for (int i = 1; i <= 10; i++) {
fib = fib + nextFib;
nextFib = fib - nextFib;
System.out.println(fib);
}
}
}
* Print first 10 Fibonacci numbers.
* --The sequence has been used in the design of a building
* -- Used in Sprint Planning in Agile Practice
*
*/
public class TestFibonacci
{
public static void main(String[] args) {
int fib = 0, nextFib = 1;
for (int i = 1; i <= 10; i++) {
fib = fib + nextFib;
nextFib = fib - nextFib;
System.out.println(fib);
}
}
}
No comments:
Post a Comment