QUESTION 1 (12 MARKS) Write a complete CH+ program based on the following pseudocodes. The functions f(x)= 3x - cosx-1 a
Posted: Sat May 14, 2022 4:05 pm
QUESTION 1 (12 MARKS) Write a complete CH+ program based on the following pseudocodes. The functions f(x)= 3x - cosx-1 and g(x)= 3 +sin x need to be initialized at the pre-processing area as user defined mathematical functions. Set s = 1, error=0.00001, x1 = 2; do fl= f(xl); gl = g(xl); x2 = x1 - 1 Display s, x2, f(x2); x1 = x2: ses+1; 12 = f(x2): while/2>error