#include
int main(int argc, char** argv) {
// We will keep track of the current and previous Fibonacci number.
// The first first Fibonacci number is 0 and the next is 1.
int previous = 0;
int current = 1;
// Number of iterations
int n = 10;
for (int i = 1; i <= n; i++) {
printf("%d - %d\n", i, current);
// Go to the next Fibonacci number
int current_backup = current;
current = current + previous;
previous = current_backup;
}
return 0;
}