![]() If you want to solve for z in the first equation so that you are solving for z in all four equations, you will need to factor the equation ahead of time to isolate z on one side of the equation. Your solution asked the user for x,y and z, but then there is nothing to solve for because you've given values to all three variables, and the chances are pretty good that the value given by the user for variable z would not be correct and satisfy the equation. Now, if you take the "simple" approach, and say you always solve for z, then your first equation gives you a problem. z = a * b – ( c / 2 ) 'here three variables again. z = 8 * ( e ^ 5 ) – c 'here again, user would enter two variableĭ. z = x * (y – z) 'allow the user to enter and you solve for the fourth.Ĭ. What if the program was expected to allow solving for any one of the variables, not just z, i.e.Ī. In fact, this could be more than a simple programming exercise, but also a math exercise. ![]() ![]() Well, the thing that struck me first is that those didn't look like quadratic equations, but rather simple equations.Īnd, the posted instructions would seem to concur, it says provide a user interface to solve the equations.Īt first glance, I assumed you would be solving for z, so would expect the user to provide the other variables.īut, if the equations given are correctly written, then the first one is not that simple because you have z on both sides of the equation, so to solve for z you have to do some factoring. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |