answersLogoWhite

0

try this out...

#include

#include

float valcal(float);

int main(){

float a,b,f,x,f1,f2,f3,i;

a=2;

b=3;

int flag=0;

f1=valcal(a);

f2=valcal(b);

//printf("\n\n%f %f",f1,f2);

for(i=0;i<7;i++){

if(f1*f2<0){

x=((a+b)/2)

;flag=1;

//printf("\n\nval of x : %f",x);

}

f3=valcal(x);

//printf("\n\nf3: %f",f3);

//(f3<0)?(f1=f3):(f2=f3);

if(f3<0){

f1=f3;

a=x;

}

else{

f2=f3;

b=x;

}

}

if(flag==1)

printf("\n\nTHE SOL IS : %f",x);

else

printf("\nNO SOLUTION\n");

printf("\n\n");

system("pause");

}

float valcal(float x){

float f;

f=((x*x*x)-(4*x)-9);

return f;

}

NEED MORE HELP...

CONTACT ME THROUGH MAIL...

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

What is printing out and inputting variable in C programming?

input and output


Does c language support network programming?

The C language supports whatever functionality is provided by the applicable library, by the programmer, and by the input/output capabilities of the platform. Since a network programming library is available to the c compiler, then yes, the c language supports network programming.


In computer programming C stand for?

C and it's variants (C++, C#, etc...) are all programming languages. C is simply a method of using words and alphanumeric characters to create a set of instructions that form a program.


How are input and output functions are accessed in C programming?

The most common way to invoke an input/output function is calling it by its name. Example with function puts:puts ("Hello world");


How do you compute the holzer method in C programming?

Hafner/Maass have done it in Fortran. Maybe of help by translating?


C programming code for gauss Jordon method to solve quadratic equation?

how to use gauss programming to find LM unit root test with structural breaks and kpss


What is the function of symboland in C programming?

The symbol and (ampersand, &amp;) in C and C++ programming is the bitwise inclusive or operator. If there are two ampersands (&amp;&amp;) it is a relational inclusive or operator. As a unary operator, it means to take the address of something. In C++, it can also be overridden in a class method to mean nearly anything else.


How the pin no is generated in the ATM?

there is a programming code for it which takes 16 digit as input , plays with it in a c programme and gives a 4 digit output...........


How do you output multiple 's on a single line in c plus plus programming language?

its supposed to have an asterisk there before the 's but it wouldnt print it


What do you understand by the left and right parenthesis in main method in C programming?

I understand they have the same meaning as they do for any function in C; to separate the function name from its arguments.


What is c and c in computer programming?

C and C++ are both high-level programming languages.


What is imperative method?

An imperative method is a programming method where the system commands the computer on exactly what to do step by step. It focuses on giving explicit instructions on how to achieve a task, often involving changing state or modifying data directly in the program. It is commonly used in procedural programming languages like C and Pascal.