#include <stdio.h>
#include <stdlib.h>
int *add(int *K, int y);
int main() {
    printf("Hello world!\n");
    int n = 2;
    int *a0 = malloc(n * sizeof(int));
    *(a0 + 0) = 1;
    *(a0 + 1) = 1;
    int condition = 0;
    while (condition < 3) {
        a0 = add(a0, n);
        if (!a0) return 1;
        for (int let = n; let < 2*n; let++){
            *(a0 + let) = *(a0 + let-1 )+ *(a0 + let-2);
        }
        n *= 2;
        condition++;
    }
    int LONLON = 0;
    while (LONLON < n) {
        printf("%d ",*(a0 + LONLON));
        LONLON++;
    }
    free(a0);
    return 0;
}

int *add(int *K, int y){
    int *tmp = realloc(K,2*y * sizeof *K); 
    if (!tmp) {
        free(K);
        return NULL;
    }
    return tmp;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: