Posted by powerblazer on 10:11:00 05-09-2003
Okay, I'm a 12 year old who stumbled onto c++ programming when I was wondering how to make a game, but I found that hard, but I still learned c++ and found game engines to help me. Well in my free time when I'm bored I made a program called Homework Doer, or Calculator because it well calculated addition, division, subtraction, multiplication, the area/perimeter/surface area/volume of a polygon, triangle, circle, and 3d rectangular prisms. It can also check if a numbers greater than, or less than. Well thats good and well and when I get to learn visual windows programming I'll trasnfer this program to visual format to sell, but I want to make a program that does, well algebra and prealgebra problems, cause I'm a sixth grader and do prealgebra, and my friends to prealgebra and algebra so I want to make it to make homework easier, so can someone help me on how to do a program that, well lets the user enter a problem like:
x+5=15
And the program finds out what X is, can anyone give me a tip on how to start?
Thanks!
Posted by Smerdyakov on 22:56:00 05-09-2003
Well, you have some rules that you apply when you try to solve it yourself, right? You just need to figure them out exactly and use them in your program.
Posted by powerblazer on 04:59:00 05-10-2003
Cool, I think I get it, okay off to programming I go! Oh yeah, I'll include a source code for my program Homework Doer so you can check it out, but thats in a little while.
Posted by dxprog on 09:24:00 05-10-2003
I've been baffled by this one too. I hope things fare well for you
[addsig]
Posted by powerblazer on 04:34:00 05-13-2003
Aye.....I'm baffled too....sigh....I'll try to get more info on how to do this.
Posted by Smerdyakov on 07:49:00 05-13-2003
You've probably been taught how to solve algebra problems by writing separate steps of "simplifying" on different lines, right? Try a whole bunch of different examples and work out all of the steps to solve each one. Then look for general rules that you are using to go from step to step. If you do this and you're still stuck, try showing us a few problem solutions and maybe we can help you find a rule or two.
Posted by neonbjb on 22:20:00 05-13-2003
C++ might not be the best language for this little prob you have.. you need regular expressions so that you can accurately parse a string "x+1=5" once you can pase it.. well its only a matter of a pretty big algorithm that you can finish this thing up.. but languages with regular expressions BUILT IN are perl, python, java, nd i think VisualBasic.. just a suggestion. (Course, you could always search for an hour online and find one of those regular expression libraries for C++)
Posted by Neu[Mann] on 00:16:00 05-14-2003
Let's make the list: Python, Perl and Ruby
Other languages like Java uses external libraries.
The use of regexpes in VB requires a COM object so you can use the same object in C++.