#include #include #define PI 3.1415927 long int factorial(int n) { if (n<=1) return(1); else n=n*factorial(n-1); return(n); } int main (void) { static int z, i, x, y = 2/PI, answer; long int factorial(int n); printf("Enter a number :"); scanf("%i",&answer); if( answer == 0) { //if answer is 0 the error is 0 printf("The error is : 0 \n \n"); } //if block ends else { for (i = 1; i <= 7; i = i + 2){ for (x = 0; x <= 4; ++x){ z = z+ y*(pow(answer,i)); } //for block ends } printf("Error = %i \n", z); } return 0; }