At this moment, I am writing a program that solves the real root of the function f(x) =.05x - sin(x) using false position method. I have my code below. It works fine, but i want to make this
At this moment, I am writing a program that solves the real root of the function f(x) =.05x - sin(x) using false position method. I have my code below. It works fine, but i want to make this false position method a function so that my main program will appear short.
I still have 5 methods left and i think that if this method is fixed then all the other remaining methods will also be fixed by similar way.
This is what i want to do in my main program:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
cout << "What method do you want to use?" << endl;
cout << "Press 4 for false position. "<< endl;
cin >> selection;
if(selection == 4)
First of all, it should be if(selection == 4)
(two equals signs instead of one), since o