Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Correct the following code in C language: #include #include int main() { float x,a,b,c,y; int nu; { printf (Enter the value of x:); scanf(%f,&x); a

Correct the following code in C language:

#include #include

int main() { float x,a,b,c,y; int nu; { printf ("Enter the value of x:"); scanf(%f,&x); a = (x*x) - (7*x) + 10; b = 3*x+4; printf (" Value of a = %f, Value of b = %f", a,b); c=a; if(c>=9) {y=(a*a*a)/3 (2*b) + (b*b)/2;} else {y=(a+b)/2 ((a-b)/4);} printf(" The final result y = %f",y); printf(" Do you want to repeat calculation?(1-True,2-False):"); scanf ("%d,&nu"); } while(nu==1) return 0; }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

assess the infl uence of national culture on the workplace

Answered: 1 week ago