Bisection Method

download Bisection Method

of 1

description

author: prajyot

Transcript of Bisection Method

  • #include#include

    void main(){

    int i=1;double a,b,c,x0,x1,x2,f0,f1,f2;

    clrscr();

    printf("\nEnter the coefficiets(a,b & c) : ");scanf("%lf%lf%lf",&a,&b,&c);

    S : printf("\nEnter two initial estimates(x1 & x2) : ");scanf("%lf%lf",&x1,&x2);

    f1=(a*x1*x1+b*x1+c);f2=(a*x2*x2+b*x2+c);

    if((f1*f2)