Random Stuff Forums
 

Go Back   Random Stuff Forums > The Archives > Archives

Archives Old useless posts are moved here.

 
 
LinkBack Thread Tools Display Modes
  #1  
Old 22-01-2009, 06:27 PM
Jay's Avatar
Jay (Offline)
New Member
 
Join Date: Sep 2007
Location: Behind You.
Posts: 37
Jay is an unknown quantity at this point
Default Creating X Solving Program

Harrow fellow people of great help,

I need to write a program in which you can enter an equation such as:

3x = 6
6x + 24 = 2x - 10
3x^2 / 4 = x^2 - 14

Or anything like that, and it will solve what X is, and show the working out (print it to a Rich Text Box).

I'm not quite sure how to start, any help would be great.

PS: I was thinking (because this is the only way I can think of to do it) I would set up blank textboxes in multiple formats of equations, such as I have above and depending on which the user enters numbers into, it solves for that equation type.

I'm sure there's a better way, but I can't think of it

Thanks,
Jay.
__________________

To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
  #2  
Old 22-01-2009, 07:29 PM
Epiic's Avatar
Epiic (Offline)
Member
 
Join Date: Dec 2008
Location: Illinois, US
Posts: 219
Epiic is an unknown quantity at this point
Default

I'll try to find out a way. I have the same thing on my calculator. I'll look in the manual and see what I can find.
__________________
"A working class hero is something to be."
  #3  
Old 23-01-2009, 12:47 AM
Jay's Avatar
Jay (Offline)
New Member
 
Join Date: Sep 2007
Location: Behind You.
Posts: 37
Jay is an unknown quantity at this point
Default

Not sure if it'll have Visual Basic code in a calculator manual, but thanks :P
__________________

To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
  #4  
Old 24-01-2009, 09:11 PM
Nullware (Offline)
New Member
 
Join Date: Feb 2007
Posts: 39
Nullware is an unknown quantity at this point
Default

PS: I was thinking (because this is the only way I can think of to do it) I would set up blank textboxes in multiple formats of equations, such as I have above and depending on which the user enters numbers into, it solves for that equation type.

I'm sure there's a better way, but I can't think of it
That would be a pretty poor way of doing it as it isn't very flexible and doesn't look very professional...

In my opinion you would be much better off parsing a string entered by the user after giving them instructions as to what kind of formatting/notation your program accepts. This wouldn't be exactly easy though but I'd say give it a shot if you think you're up to it.
  #5  
Old 24-01-2009, 11:53 PM
Jay's Avatar
Jay (Offline)
New Member
 
Join Date: Sep 2007
Location: Behind You.
Posts: 37
Jay is an unknown quantity at this point
Default

I'm not sure I would be able to allow it to support any equation format, only certain formats I program it to allow, which means I would have to spend alot of time making it work for multiple formats, which is almost as time consuming as my first suggestion.

Then there is still the problem of making it solve what X is, showing working out steps.
__________________

To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
  #6  
Old 24-01-2009, 11:54 PM
Epiic's Avatar
Epiic (Offline)
Member
 
Join Date: Dec 2008
Location: Illinois, US
Posts: 219
Epiic is an unknown quantity at this point
Default

Maybe this:

aX = b+c(d) -- Start

Enter the constants (a, b, c, d)

Then solve?

I don't have a clue, I've never tried visual basic in my life.
__________________
"A working class hero is something to be."
  #7  
Old 25-01-2009, 12:23 AM
Jay's Avatar
Jay (Offline)
New Member
 
Join Date: Sep 2007
Location: Behind You.
Posts: 37
Jay is an unknown quantity at this point
Default

The problem is, what if the equation is like this:

aX + b / c = d ^ e / fX

Or something different to the one template you've mentioned.
__________________

To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
  #8  
Old 25-01-2009, 12:54 AM
Epiic's Avatar
Epiic (Offline)
Member
 
Join Date: Dec 2008
Location: Illinois, US
Posts: 219
Epiic is an unknown quantity at this point
Default

Yeah, there's millions of possibilities. But there has to be a way.

I've just downloaded Visual Basic, so I'll try it out.
__________________
"A working class hero is something to be."
  #9  
Old 28-01-2009, 03:02 AM
Jay's Avatar
Jay (Offline)
New Member
 
Join Date: Sep 2007
Location: Behind You.
Posts: 37
Jay is an unknown quantity at this point
Default

No one has any suggestions?
__________________

To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 08:33 PM.

Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0
Copyright © 2006 - 2012, Rsforums.org