Różne programy na zajęcia laboratoryjne z AK2
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

fibb_c.c 405B

1234567891011121314151617181920212223
  1. #include <stdio.h>
  2. // Jan Potocki 2020
  3. unsigned long fibb(unsigned long n);
  4. unsigned long long timestamp();
  5. int main()
  6. {
  7. unsigned long term, result;
  8. unsigned long long tstamp1, tstamp2;
  9. scanf("%lu", &term);
  10. tstamp1 = timestamp();
  11. result = fibb(term);
  12. tstamp2 = timestamp();
  13. printf("Result: %lu\n", result);
  14. printf("Cycles: %llu\n", tstamp2-tstamp1);
  15. return 0;
  16. }