/* program to determine integer overflow for factorials */ #include int main ( ) { printf ("program to determine integer overflow for factorials\n"); int i = 1; int fact = 1; printf (" i factorial\n"); printf ("%3d %20d\n", i, fact); while (fact > 0) { i++; fact *= i; printf ("%3d %20d\n", i, fact); } printf ("loop ended with %d factorial = %d\n", i, fact); return 0; }