DEV Community

Biswa ranjan Patra
Biswa ranjan Patra

Posted on

Fibonacci series without third variable

public class fib_no_series {
public static void main(String[] args) {
int f = -1;
int s = 1;
while ((f + s) < 13) {
System.out.println(f + s + " ");
s = f + s;
f = s - f;
}
}
}

Top comments (0)