Browse Source

Clean code

master
Nyymix 2 months ago
parent
commit
0e78f2ac8d
  1. 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…
Cancel
Save