A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: A quicky: ax+b>c

  1. #1
    Junior Member
    Join Date
    Oct 2002
    Posts
    23

    A quicky: ax+b>c

    hey all!
    i was recently assigned the following project in math:

    -----------------------------
    BASIC Solution of Inequaltities:
    Write a BASIC program that will solve inequalities of the form ax+b>c. Your program should ask the user for the values of a, b, and c, and then print an appropriate solution. You will probably need to use and IF-THEN statement in your program. This statement allows the computer to make a choice, depending on what values of a, b, and c are given. You may also need to determine how to use the INPUT statement and the PRINT statement on your computer. Test your prgram to make sure it works for all values of a, b, and c.
    -----------------------------

    I took this project under one condition, that i could use flash MX instead of BASIC. My teacher OKed that idea. So, what do you guys think? Obviously input text boxes for a, b, and c. Please, if some one could please help me with this, i would appreciate it.

    -joe

  2. #2
    Gross Pecululatarian Ed Mack's Avatar
    Join Date
    Dec 2001
    Location
    UK
    Posts
    2,954
    Please remember there are infinite answers to this.

    If you re-arrange that equation a bit, you get:

    x > (c-b)/a

    So, x = (c-b)/a

    This works for positive inputs... I'm not sure about negitive.

  3. #3
    Junior Member
    Join Date
    Oct 2002
    Posts
    23

    sorry

    sorry about my last post, Ed Mack..
    i was confused and dint understand what you meant.. :P ... i'm sure that all of you out there are thinking.. he's dumb... he shouldnt be here... but yeah.. i see your point that it would have to be changed to x>(c-b)/a ... but, still, if some one could help me with some ideas.. about how to code it, etc.. it would be grately apreciated..

    -joe
    Last edited by joe_m_87; 10-30-2002 at 08:56 AM.

  4. #4
    Junior Member
    Join Date
    Oct 2002
    Posts
    23
    ok.. moving on here...
    lets say i made three input text boxes.. for the user to put in a, b, and c. And i made an evaluate button to solve for x. how would that code look? Here is my unsecsessfull attempt:

    on (release) {
    mess_x = (c-b)/a;
    }

    so, even thought you guys are probably lauging at me now, please try to help me.. im sorry if im wasting ure time, or what ever with this post...

    -joe

  5. #5
    Junior Member
    Join Date
    Oct 2002
    Posts
    23
    i thought that this one would be easy for you guys. I did attempt to do it on my own, but if some one could guide me in the correct way, or maybe even write the whole code or upload a fla to help me, that would be great. thanks

    -joe

  6. #6
    Senior Member
    Join Date
    Mar 2000
    Posts
    472
    Hey joe_m_87!

    Since you're getting no response, I made this example for you ... I hope it's what you want:

    inequalityExpression: .swf .fla
    Code:
    //button code
    on (press) {
        x = (c-b)/a;
    }
    For future inspiration: Kristin Henry et al at Galaxygoo.org are developing a FlashMX-based MathML reader that will parse a MathML expression generated with webMathematica (or some other middleware) using XML within Flash. You can follow the progression of the MathML reader build here.

    Richard

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center