#include int mult(int x, int y) { int result = 0; for (int i = 0; i < y; i++) { result += x; } return result; } int fact(int n) { if (n == 0) { return 1; } else { return mult(n, fact(n - 1)); } } int main() { for (int i = 0; i < 12; i++) { printf("fact(%d) = %d\n", i, fact(i)); } return 0; }