/* program to computer n^5 recursively notes: * this program lacks many descriptive elements, usually required by C/C++ Style Guides * compile this program in a Terminal window with the line gcc -o fifthPower fifthPower.c */ #include int readn () { int value; printf ("enter integer value n: "); scanf ("%d", &value); return value; } int computeFifth (int n) { int result; if (n == 1) result = 1; else result = computeFifth (n-1) + 5*n*n*n*n - 10*n*n*n + 10*n*n - 5*n + 1; return result;} int main ( ) { printf ("program to compute n to the fifth\n"); int n = readn (); int answer = computeFifth (n); printf ("%d to the fifth is %d\n", n, answer); return 0;}