/* CSE 303, Spring 2009, Marty Stepp This program prints the first 16 fibonacci numbers in reverse order. It is a demonstration of using an array. */ #include int main(void) { int i; int fibs[16] = {1, 1}; // rest are 0 // compute the first 16 fib numbers for (i = 2; i < 16; i++) { fibs[i] = fibs[i - 1] + fibs[i - 2]; } // print them in reverse order for (i = 15; i >= 0; i--) { printf("%6d", fibs[i]); if (i % 8 == 0) { printf("\n"); } } return 0; }