Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*=======================================================*/
- int main(void)
- {
- int coefficients[] = {0};
- int x_endpoints [] = {0};
- int tolerances [] = {0};
- /*== Initial prompt ==*/
- printf("\n");
- printf (" Root search results \n");
- printf (" =========================================\n\n");
- printf("Welcome! The purpose of this program is to use \n");
- printf("the bisection method, an algorithm for\n");
- printf("approximating the root of a continuous function,\n");
- printf("to find an approximate root for an equation with\n");
- printf("the form f(x)= a*x*ln(|x| + 0.5) + b*x + c.\n\n");
- /* Exit the program */
- printf("Have a nice day!\n");
- return 0;
- }
- /**************************************************************
- * Function read_input: a function to read all 7 inputs
- * Input:
- *
- *
- * Output:
- * Echos the inputs (by calling one of
- * functions below.
- *
- ***************************************************************/
- void read_input(double *coeff, double *xep, double *tole)
- {
- scanf("%lf %lf %lf %lf %lf %lf %lf",&coeff[0],&coeff[1],&coeff[2],&xep[0],&xep[1],&tole[0],&tole[1]);
- }
- echo_inputs(coeff,xep,tole);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement