Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'compute control(puzzled me so long)' topicStudent Support Forum > General > Archives > "compute control(puzzled me so long)"

Next Comment >Help | Reply To Topic
Author Comment/Response
Angel Tang
06/09/12 00:32am

This problem has puzzled me almost one year and still has no light to solve it.I sincerely hope someone help me.
the problem just as follow:
for example:
B=2;AB=3;BC=4;
D=AB*BC/B
In the mathematica,we input
In[1]:B=2;AB=3;BC=4;
D=AB*BC/B
then the answer output as
Out[1]:6

BUT!!!!!
I just want he can show
D=3*4/2=6

That's to say,I want the compute process.
How can I achieve it?

In fact, I have tried many method.
I firstly let the formula be a string as:
"D=AB*BC/B"
then I use the command "StringReplace" to replace the Simbol,such as
In[2]:StringReplace["D=AB*BC/B","B" -> "2"]
then you may find that error like
D=AB*2C/2 which is not I want.

How to program so I can have a satisfied answer?
Sincerely hope for you help.



URL: ,

Subject (listing for 'compute control(puzzled me so long)')
Author Date Posted
compute control(puzzled me so long) Angel Tang 06/09/12 00:32am
Re: compute control(puzzled me so long) Michael 06/10/12 07:30am
Next Comment >Help | Reply To Topic