int f1 = 0, f2 = 1;
int f3 = 0;
System.out.print(f1+" ");
System.out.print(f2+" ");
for (int i = 1; i <=8; i++) {
f3 = f1 + f2;
System.out.print(f3+" ");
f1 = f2;
f2 = f3;
}
Summary: -------- 1. Functions should hardly ever be 20 lines long. 2.Keep blocks (inside if, else, while, for, etc.) short. Ideally, j...
No comments:
Post a Comment