Question: Can you please help fix this C program Please don't use cin and count statements #include C15 fler S Sint calculate_forx(int x): * variable for

Can you please help fix this C program

Please don't use cin and count statements

Can you please help fix this C program Please don't use cin

and count statements #include C15 fler S Sint calculate_forx(int x): * variable

#include C15 fler S Sint calculate_forx(int x): * variable for normal quadratic formula i nt RecursiveQuadratic(int x); /* variable for recursive quadratic formula dent reel the prototypes int mainte- int y.x declaring variables for normal formula / char choice. I creating option for user to place an integer" deewh u ntil whe 7 do "initiating the achieving of an integer and placing and receiving from both formulas blant spice I veldute ant befin printf("This program calculates f(x) in 2 ways"); printf(in Enter positive value for "); scanf("%d",&x); " reads users input - make sure yo y = calculate_forx(x); /* defining calling formula printf("f(x) = %d ". y); prints sum" y = RecursiveQuadratic(x); / defining calling formula printf("Using quadratic f(x) = %d ". y): /prints sum printf("Do you want to continue?"): now? do initiating a choice for user to continue or stop scanf("%c", &choice): odd organization while (choice ann") if (choice == 'n' || choice == 'N) cm T eam ? nope - put the condition ima while (p=0) Ciment antin 1 testing the function 2z^2+42 +6 int calculate_forx(int z); integer for x inputted into normal formula "1- space int fofx, sum=0; /* formula is 2z^2+42+6. f(z+1) = f(z)+4+z(ie 2a)+6(a+b), f(0) = 6 so for example f(1) = f(0)+4"z+6=6+10=16 / should be * Another example is f(2)=f(1)+42+6 = 16+4+2+6=16+14=30*/ while (2-1) >= 0) { bases of the formula one lime iste sum += 4*z +6; 2 2 2 + 4 *Z z; calculate sund/+= 6: return sum; /* return to main to be printed 3 spaces f2)= int RecursiveQuadratic(int z): if (z == 0) Comment eturn 6; integer for z inputted from xy of for 6 3. indent else return Recursive Quadratic(z - 1) + 4* z+6; /* return to main to be printed / #include C15 fler S Sint calculate_forx(int x): * variable for normal quadratic formula i nt RecursiveQuadratic(int x); /* variable for recursive quadratic formula dent reel the prototypes int mainte- int y.x declaring variables for normal formula / char choice. I creating option for user to place an integer" deewh u ntil whe 7 do "initiating the achieving of an integer and placing and receiving from both formulas blant spice I veldute ant befin printf("This program calculates f(x) in 2 ways"); printf(in Enter positive value for "); scanf("%d",&x); " reads users input - make sure yo y = calculate_forx(x); /* defining calling formula printf("f(x) = %d ". y); prints sum" y = RecursiveQuadratic(x); / defining calling formula printf("Using quadratic f(x) = %d ". y): /prints sum printf("Do you want to continue?"): now? do initiating a choice for user to continue or stop scanf("%c", &choice): odd organization while (choice ann") if (choice == 'n' || choice == 'N) cm T eam ? nope - put the condition ima while (p=0) Ciment antin 1 testing the function 2z^2+42 +6 int calculate_forx(int z); integer for x inputted into normal formula "1- space int fofx, sum=0; /* formula is 2z^2+42+6. f(z+1) = f(z)+4+z(ie 2a)+6(a+b), f(0) = 6 so for example f(1) = f(0)+4"z+6=6+10=16 / should be * Another example is f(2)=f(1)+42+6 = 16+4+2+6=16+14=30*/ while (2-1) >= 0) { bases of the formula one lime iste sum += 4*z +6; 2 2 2 + 4 *Z z; calculate sund/+= 6: return sum; /* return to main to be printed 3 spaces f2)= int RecursiveQuadratic(int z): if (z == 0) Comment eturn 6; integer for z inputted from xy of for 6 3. indent else return Recursive Quadratic(z - 1) + 4* z+6; /* return to main to be printed /

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!