Answered by:
Write the program to calculate X in equation 3X20=4; please
Question

Answers

Hi pavlob,
If a given equation "3x20=4" is fixed, code would be like this:
x = (4 + 20) / 3; Console.WriteLine("x = " + x); Console.ReadLine();
I guess the given equation varies.
If so, you need to provide requirements about the equation.
e.g.
the equation is given by Console.ReadLine.
an arithmatic operator occurs only once and it is "".
Regards,Ashidacchi  http://hokusosha.com
 Proposed as answer by cheong00Editor Wednesday, October 30, 2019 1:12 AM
 Marked as answer by Decompressor Wednesday, October 30, 2019 7:09 AM
All replies

Hi pavlob,
If a given equation "3x20=4" is fixed, code would be like this:
x = (4 + 20) / 3; Console.WriteLine("x = " + x); Console.ReadLine();
I guess the given equation varies.
If so, you need to provide requirements about the equation.
e.g.
the equation is given by Console.ReadLine.
an arithmatic operator occurs only once and it is "".
Regards,Ashidacchi  http://hokusosha.com
 Proposed as answer by cheong00Editor Wednesday, October 30, 2019 1:12 AM
 Marked as answer by Decompressor Wednesday, October 30, 2019 7:09 AM

Hi pavlob,
Thank you for posting here.
If you want to solve polynomial equation, you can refer to the following reference.
I download the project and make a test.
Here’s a result of my test.
Hope it could be helpful.
Best Regards,
Xingyu Zhao
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com. Proposed as answer by cheong00Editor Wednesday, October 30, 2019 3:49 AM







