Example #1
0
File: fctrl2.c Project: candu/spoj
void big_print(struct big* b) {
  if (b->q == NULL) {
    printf("%d", b->x);
    return;
  }
  big_print(b->q);
  printf("%09d", b->x);
}
Example #2
0
File: 495.c Project: doucette/uva
int main()
{
    big f[5001];
    int m = 2, n;

    memset(f, 0, sizeof(f));
    f[1].v[116] = 1;

    while (scanf("%d", &n) == 1) {
        for (; m <= n; ++m)
            big_add(&f[m - 2], &f[m - 1], &f[m]);
        printf("The Fibonacci number for %d is ", n);
        big_print(&f[n]);
        putchar('\n');
    }

    return 0;
}
Example #3
0
File: fctrl2.c Project: candu/spoj
void big_println(struct big* b) {
  big_print(b);
  printf("\n");
}