C++ problem please explain with comments why (Please do not use C)

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

C++ problem please explain with comments why (Please do not use C)

Post by answerhappygod »

C++ problem
please explain with comments why (Please do not use C)
C Problem Please Explain With Comments Why Please Do Not Use C 1
C Problem Please Explain With Comments Why Please Do Not Use C 1 (115.49 KiB) Viewed 28 times
C Problem Please Explain With Comments Why Please Do Not Use C 2
C Problem Please Explain With Comments Why Please Do Not Use C 2 (53 KiB) Viewed 28 times
Description of the Secant Method: The Newton-Raphson method is an extremely powerful approach to solve numerically single variable non-linear equation, but it has a major weakness: the need to know the value of the derivative of the function f(x) at each approximation of x. Frequently, f'(x) is far more difficult and needs more arithmetic operations to calculate than f(x). To circumvent the problem, a slight modification to NR is introduced known as the Secant method. The successive approximations of x by the NR method is Xn+1 = xn + -f(xn) f'(xn) The modification to successive approximations of x in the secant method is Xn+1 = xn + -f(xn)(xn – Xn-1) f(xn) - f(xn-1) The secant method needs to start with two initial guesses namely X1 and Xo, and then compute X2. Error is computed using the same formula as was used for the NR method. Note: In the secant method, only one function value needs to be computed per step after the initial step.
Problem 3 Points: 7 Write a program that allows the user to choose the size of a vector (up to 10 elements) and allows them to input integers as the elements. Sort the array in ascending order and compute the mean and standard deviation. You may not use a predefined sort function - you must develop your own algorithm. Display the sorted array, and the mean and the standard deviation of the array.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply