// AUTHOR : If you like this, please donate to this Bitcoin address: 19GU2ZUFgwbsXM1NSP7jM55FnDiDiN5eCr // PURPOSE : Accept an integer number N from the user, and print out the first N Fibonacci numbers. #include int main() { int n; // the number of Fibonacci we want to print int count; // the number of Fibonacci number printed so far. Loop Counter Variable int first; int second; int next; printf("\n Please enter a number greater than 2 : "); scanf_s("%d", &n); first = 0; second = 1; printf("%5d %5d", first, second); count = 2; // because 2 numbers have been printed so far while (count < n) { next = first + second; printf("%5d", next); count = count + 1; first = second; second = next; } getchar(); getchar(); return 0; }