I found a program, and am very new to C programming.... I can't make sense of the last line in the program, to change it to an equation....
This is more of a math question than a C programming question, but I need to know the true significance of the line:Code:int p(int n) { return 1; } int n(int x) { if (x >= 0) return n(x-5) + p(x); return 0; } int d(int x) { if (x >= 0) return d(x-10) + n(x); return 0; } int q(int x) { if (x >= 0) return q(x-25) + d(x); return 0; } int c(int x) { if (x >= 0) return c(x-50) + q(x); return 0; } main() { int i; for (i = 1; i < 101; i++) printf("%d: %d\n", i, c(i)); }
printf("%d: %d\n", i, c(i));