diff options
author | pommicket <pommicket@gmail.com> | 2022-02-13 11:24:30 -0500 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2022-02-13 11:24:30 -0500 |
commit | 6814de197447f5d6196b8b810e51406bf963dfca (patch) | |
tree | 49be2c4a1717562f342b5c949722b1f37997736e /05/main.c | |
parent | 6b42f4198fe4e991964a0891aee17c8b79ee1a5b (diff) |
comparison operators
Diffstat (limited to '05/main.c')
-rw-r--r-- | 05/main.c | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -1,19 +1,17 @@ long factorial(long x) { - return x ? x * factorial(x - 1) + return x > 0 ? x * factorial(x - 1) : 1; } long fibonacci(long x) { - return x ? - x-1 ? + return x > 0 ? + x > 1 ? fibonacci(x-1) + fibonacci(x-2) : 1 : 0; } int main(int argc, char **argv) { - int x = 104; - x >>= 3; - return x; + return factorial(6); } |