My friend asked me to make a small program for him. I figured C# would be the best language to do this in (and have a GUI). This in one part is a very simple program, in another part, a more difficult to create program.

Part 1
Create a program that will ask for input to 5 variables, A-E. And it will solve this equation: 3A + B + 4C + D - E. And it will then output the answer somehow, be it a new window (Meh) or some extra dialog in the current window.

Part 2
Create a program that will scan an equation, and ask for the variables, and solve the equation, and output the answer.

I'm going with the first part for now, and then the other one later. Right now my friend just wants the first part Smile

Oh, and I figured qazz42 and I could use this to learn C# better Smile

Edit: Oh and don't post code please Smile
I could do that, thats childs play (the first one)....

and err, I already did make C# calc...

http://choose-game.com/mambo/index.php?option=com_docman&task=doc_download&gid=7&Itemid=39
Not neccesarily a calculator, but rather, well...
Say you enter: sqrt(A^2+B^2)
It would ask you for: A and B
and would return the answer.

And it would have history if I/you wanted it to Smile
Oh, I think I can do that. Almost done with the first one.
Wow, you're just hitting a whole bunch of new languages these days, tanner; good for you! I haven't the time to try these, as I'm working on some C++ for class atm, so I'll look forward to seeing what SirCmpwn comes up with.
First one: http://cid-c5fee036bc0d72bd.office.live.com/self.aspx/Public/TannerEquation.exe
http://dl.dropbox.com/u/11832443/MJs%20Program.exe

Woo! Working on the second one now Smile
Second one: http://cid-c5fee036bc0d72bd.office.live.com/self.aspx/Public/TannerEquation.zip
http://uploading.com/files/1f2m47f4/tannerstuff.exe/

here is my version of the first one


while Sir's is GUI, mine is command line
Looks good SIr!

@qazz42, very nice Very Happy
Thanks player!
It's not that great, and has no error handling (I made it in 10 minutes Razz)
Your second one threw an error when I did sqrt(2[x]+3).
sqrt(2 * [x] + 3)
Remember to use spaces.
Ah, fair enough.
I assume that worked better?
It apparently doesn't know sqrt.
Capital S
x.x
I just used NCalc, an open source library for evaluating expressions.
eh, the second one is a bit too complicated, though you will find my version of the first problem is simpler to use Smile
Looks pretty good, qazz42.
Very Happy thanks SirCmpwn

I actually learned alot from making this 10-min prgm

especially how to manipulate variables (strings and ints mainly)
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 2
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement