Just want to now is there a code for either VB6 or Microsoft Visual C++ 2005 Express so that u can enter an algebra equation(which include unknown variables like x ) for the computer to solve and actually get the answer right.And also a code for but i thought it but just asking, to make a word problem written into an alegbra equation.And if no such think actually exist but can it be done?
VB code question?
well the first one is easy, u just use the formula to solve it, add 3 text boxes for the equation coff, add two labels for results, here's the code:
--------------------------------------...
A = Text1.Text
B = Text2.Text
C = Text3.Text
Var = (B ^ 2) - (4 * A * C)
If Var %26lt; 0 Then
Label1.Caption = "No Solution"
Else
Label1.Caption = -B + Sqr((B ^ 2) - (4 * A * C)) \ (2 * A)
End If
If Var %26lt; 0 Then
Label2.Caption = "No Solution"
Else
Label2.Caption = -B - Sqr((B ^ 2) - (4 * A * C)) \ (2 * A)
End If
--------------------------------------...
but i think making the cpu understanding a word problem is very hard maybe impossible..
if u need anything else in vb jst mail me: biboeg2001@yahoo.com
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment