Newer
Older
Import / research / reflection / examples / fibonacci.c
@John John on 29 Dec 2020 351 bytes bulk import from macbookpro checkouts
#include <stdio.h>
#include <stdlib.h>

int main()
{
  uint32_t next = 0;
  for (int x = 0; x < 100; x++)
  {
    int n = 3000000;
    uint32_t t1 = 0;
    uint32_t t2 = 1;
    next = 0;
    for (int i = 0; i < (n - 1); i++)
    {
      next = t1 + t2;
      t1 = t2;
      t2 = next;
    }
  }
  printf("%u\n", next);
  exit(next);
  return next;
}