Home Basic Loop Array string Function Pointer Contact STUDY

AHF    C    PROGRAM    SOLVING

Programming tips

Iterative statement



Test expression



Working with switch case



Specifer



" ; " after loop




Implementation of NEWTON-RAPSON method




// AHF C PROGRAM SOLVING

//solving here 2_D   ARRAY 	programming problem

#include<stdio.h> #include<stdlib.h> #include<math.h> #define pf printf int main() { float valuex,valuey,x,x0=0.0; foisal: x=x0; valuex= pow(x,2) - x - 2; valuey= 2*x - 1; x0= x - (valuex/valuey); if(valuex == 0.00) { pf("\nSince f(%.1f) = 0, the root closer to the point x = 0 is %f",x0,x0); goto end; } else goto foisal; end: exit(1); }
OUTPUT:


© 2018 - All rights reserved