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; } } }

Jun 1, 2025 - 16:10
 0
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;
}
}
}