Clean code

This commit is contained in:
Nyymix 2022-04-29 09:45:11 +03:00
parent 624d4527a8
commit 0e78f2ac8d

14
fibo.c
View file

@ -6,6 +6,13 @@
long Fibo (long x); long Fibo (long x);
long Fibo (long x) {
if (x < 3)
return 1;
else
return Fibo (x-1) + Fibo (x-2);
}
int main (int argc, const char * argv[]) { int main (int argc, const char * argv[]) {
long fibo; long fibo;
@ -26,10 +33,3 @@ int main (int argc, const char * argv[]) {
return 0; return 0;
} }
long Fibo (long x) {
if (x < 3)
return 1;
else
return Fibo (x-1) + Fibo (x-2);
}