R2023.05.1 - aktualizacja wykładu
This commit is contained in:
+7
-5
@@ -1,5 +1,7 @@
|
||||
#include <stdio.h>
|
||||
|
||||
// Jan Potocki 2020
|
||||
|
||||
unsigned long fibb(unsigned long n);
|
||||
unsigned long long timestamp();
|
||||
|
||||
@@ -7,15 +9,15 @@ int main()
|
||||
{
|
||||
unsigned long term, result;
|
||||
unsigned long long tstamp1, tstamp2;
|
||||
|
||||
|
||||
scanf("%lu", &term);
|
||||
|
||||
|
||||
tstamp1 = timestamp();
|
||||
result = fibb(term);
|
||||
tstamp2 = timestamp();
|
||||
|
||||
printf("%lu\n", result);
|
||||
|
||||
printf("Result: %lu\n", result);
|
||||
printf("Cycles: %llu\n", tstamp2-tstamp1);
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user