| Home | Tutorials | Forums | Articles | Blogs | Movies | Library | Employment | Press | Buy templates |
|
|
#1 |
|
Resident Evil 4
Join Date: Aug 2005
Location: Lebanon
Posts: 444
|
hi all just wanna see a flash application that can evaluate a math. expression
like >>2+8-(5*3) >>ans= -5 >>sin(pi*3/2)+3 >>ans= 2 let's see ... only to make it simple make only the arithmetic operation as for me i can do the first one coz i programmed it in C# long ago and it's easy but the seconde i think is the Challenges. ok guys let's see what u can do ... ![]() |
|
|
|
|
|
#2 |
|
Well known nobody
Join Date: Jul 2004
Location: Australia
Posts: 818
|
Is this supposed to be in 25 < lines of code? 'Cause i've made a calculator already (works in base 12 :P) but I'm pretty sure it's more than 25 lines. Also, there's a math.eval function someone's put on layer51 which works with pretty much everything, which is pretty cool. It's certainly more than 25 lines.
|
|
|
|
|
|
|
|
|
#3 |
|
Resident Evil 4
Join Date: Aug 2005
Location: Lebanon
Posts: 444
|
hi, can u show us ur .swf file.
![]() |
|
|
|
|
|
#4 |
|
Well known nobody
Join Date: Jul 2004
Location: Australia
Posts: 818
|
Well, it's at http://thor.prohosting.com/laguana/B12Calc.swf. It's still buggy i think, 'cause i was just messing 'round with it. Also, it uses crazy symbols 'cause me and my friends made up our own base 12 notation :P
If i recall, | is a decimal place, so 1|2 is 1.2, in base 12, so it's 1 and 2 12ths. V is 10, X is 11. ~ is the negative button, so pressing 1 then ~ should make it -1. The other symbols should be recognised already. It works fine for single operations, and follows order of operations, but brackets break it really easially. |
|
|
|
|
|
#5 |
|
1st party software!
Join Date: Nov 2003
Location: South Africa
Posts: 905
|
Slightly off the topic...
Which is correct? 4+5*6=54 or 4+5*6=34 ??? I keep wondering about this.. Conventional calclators (as in Windows calculator) show 54 as being correct... YET, scientific calculators, apply BODMAS to the equation before working it out... ![]() If anyone knows, please let me know too...
__________________
- Morg - - - - - - -> Magazine style textformatting with pullquotes [Me & pixelwit] -> Drawing a dashed line with actionscript [Various] -> Track Mouse Position Outside of Flash Control [Arodicus] |
|
|
|
|
|
#6 |
|
Resident Evil 4
Join Date: Aug 2005
Location: Lebanon
Posts: 444
|
well Laguna this is totally different for what i m asking for
![]() have'nt u work in the MatLap Program it's like this ur input is a string >> 2*6-3 then the program respond 9 u know not input are buttons ( ur calculator is too easy to make) sorry but it's not the challenge i m asking for ![]() |
|
|
|
|
|
#7 | |
|
Dont set yourself on fire
|
Quote:
the equation (4+5*6) is ALWAYS equal to 34. the only reason basic calculators would return 54 is user error (it is up to YOU to enter the numbers in the right order). aren't challenges supposed to be started with a working example? it's always suspicious when people describe a complicated task, but don't put forth the effort to do it themselves. it makes me think the originator is posting his/her CS homework assignment hoping someone will do the work for him/her for free. |
|
|
|
|
|
|
#8 |
|
1st party software!
Join Date: Nov 2003
Location: South Africa
Posts: 905
|
Hey Invader.
Yea, I spoke to one of my old math teachers yesterday... He said the same thing. If theres no brackets, then start at the left, and run through it normally. Thanks for the response! Much appreciated!
__________________
- Morg - - - - - - -> Magazine style textformatting with pullquotes [Me & pixelwit] -> Drawing a dashed line with actionscript [Various] -> Track Mouse Position Outside of Flash Control [Arodicus] |
|
|
|
|
|
#9 |
|
Resident Evil 4
Join Date: Aug 2005
Location: Lebanon
Posts: 444
|
oh yeah this thread is about calculation and Math Calculator, LOL
![]() |
|
|
|
|
|
#10 |
|
1st party software!
Join Date: Nov 2003
Location: South Africa
Posts: 905
|
Ok, so back to the challenge:
amen0, you are looking for a basically 2 textfields; the ones an input field and the other an output field? You type a long equation in there, and then hit answer to see the program work it out for you? Have you done one already?
__________________
- Morg - - - - - - -> Magazine style textformatting with pullquotes [Me & pixelwit] -> Drawing a dashed line with actionscript [Various] -> Track Mouse Position Outside of Flash Control [Arodicus] |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Developing a flash site, Part1: Some thoughts | Bloom22 | Other Flash General Questions | 6 | 09-29-2006 03:10 AM |
| Making a flash website (flash in a flash in a flash etc...) | ALehx | ActionScript 1.0 (and below) | 1 | 04-04-2005 04:03 PM |
| [Q] Do we need those forums??? | CyanBlue | General Chat | 59 | 07-27-2004 12:13 PM |
| Macromedia Central | CyanBlue | ActionScript 1.0 (and below) | 13 | 08-01-2003 10:05 PM |