comparison operators
This commit is contained in:
parent
6b42f4198f
commit
6814de1974
3 changed files with 187 additions and 21 deletions
10
05/main.c
10
05/main.c
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue