Commit 363e8656 authored by Fokion Zervoudakis's avatar Fokion Zervoudakis

Inline variable declaration.

parent a11ad2c8
......@@ -12,9 +12,9 @@ class Fib {
@return the {@code n}th Fibonacci number
*/
int it(int n) {
int a = 0, b = 1;
int a = 0, b = 1, c;
for (int i = 0; i < n; i++) {
int c = a + b;
c = a + b;
a = b;
b = c;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment