|
|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 364 (0x16c)
Types: TextFile
Names: »fibo24.c«
└─⟦db229ac7e⟧ Bits:30007240 EUUGD20: SSBA 1.2 / AFW Benchmarks
└─⟦this⟧ »EUUGD20/AFUU-ssba1.21/ssba1.21E/utah/fibo24.c«
└─⟦this⟧ »EUUGD20/AFUU-ssba1.21/ssba1.21F/utah/fibo24.c«
#define NTIMES 10
#define NUMBER 24
#define REG register
main()
{
REG int i;
REG unsigned value;
unsigned fib();
printf("%d iterations: ", NTIMES);
for (i = 1; i <= NTIMES; ++i)
value = fib(NUMBER);
printf("fibonacci(%d) = %u.\n", NUMBER, value);
exit(0);
}
unsigned fib(x)
int x;
{
if (x > 2)
return (fib(x-1) + fib(x-2));
else
return (1);
}