Clean code
This commit is contained in:
parent
624d4527a8
commit
0e78f2ac8d
1 changed files with 7 additions and 7 deletions
14
fibo.c
14
fibo.c
|
@ -6,6 +6,13 @@
|
|||
|
||||
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[]) {
|
||||
|
||||
long fibo;
|
||||
|
@ -25,11 +32,4 @@ int main (int argc, const char * argv[]) {
|
|||
printf("Laskenta kesti: %f sec\n",(done-start)/(double)(CLOCKS_PER_SEC));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
long Fibo (long x) {
|
||||
if (x < 3)
|
||||
return 1;
|
||||
else
|
||||
return Fibo (x-1) + Fibo (x-2);
|
||||
}
|
Loading…
Reference in a new issue