#include <stdio.h>
void main() {
int n;
printf("Masukkan bilangan maks: ");
scanf("%d", &n);
int fibonanci[n];
for (int i = 0 ; i < n; i++) {
if (i == 0 || i == 1)
fibonanci[i] = i;
else
fibonanci[i] = fibonanci[i - 1] + fibonanci[i - 2];
printf("%d ", fibonanci[i]);
}
}
To embed this project on your website, copy the following code and paste it into your website's HTML: