Results 1 to 10 of 10

Thread: trades

  1. #1
    whosadork is offline Member
    Join Date
    Sep 2008
    Posts
    29
    Rep Power
    0

    Default trades

    How do i make a trade?
    like...

    public class trade
    {
    public static void main( String args[] )
    {
    int trade1 = 50;
    int trade2 = 5;
    }
    }

    how do i make the trade from trade1 to trade2
    like make the trade 5, and 50 / 5 = 10

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    Huh?

    Please read How to ask Smart Questions. It will help you to ask questions that are answerable. Good luck.

  3. #3
    ojn
    ojn is offline Senior Member
    Join Date
    Aug 2008
    Location
    Stockholm, Sweden
    Posts
    119
    Rep Power
    0

    Default

    Not quite sure I follow you. Do you want them to switch values => trade1 = 50 and trade2 = 5 (hence the opposite)?

  4. #4
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Quote Originally Posted by whosadork View Post
    How do i make a trade?
    like...

    public class trade
    {
    public static void main( String args[] )
    {
    int trade1 = 50;
    int trade2 = 5;
    }
    }

    how do i make the trade from trade1 to trade2
    like make the trade 5, and 50 / 5 = 10
    You should ask your question much clearly. I've no idea what you are looking for. Please read that link posted by Fubarable. Seems to me your question is not cleared to anyone else.

  5. #5
    whosadork is offline Member
    Join Date
    Sep 2008
    Posts
    29
    Rep Power
    0

    Default

    like how do i tell it that the trade between those two is 10? so it would trade TRADE1 to TRADE2 therfore adding 5 to TRADE2.

  6. #6
    emceenugget is offline Senior Member
    Join Date
    Sep 2008
    Posts
    564
    Rep Power
    6

    Default

    you must explain your concept of 'trade' clearly

  7. #7
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Quote Originally Posted by emceenugget View Post
    you must explain your concept of 'trade' clearly
    Yes it is. No one here have any idea about 'trade'

  8. #8
    CJSLMAN's Avatar
    CJSLMAN is offline Moderator
    Join Date
    Oct 2008
    Location
    Mexico
    Posts
    1,159
    Rep Power
    7

    Default Language barrier?

    Not sure what "Trade" means, but from what I can tell it seems to be the following:

    Java Code:
    int trade1 = 50;
    int trade2 = 5;
    int tradeRatio = trade1/trade2;// =10
    int tradeDifference = tradeRatio - trade2;//=5
    trade2 = trade2+tradeDifference;//=10
    Does this help?
    CJSL

  9. #9
    Supamagier is offline Senior Member
    Join Date
    Aug 2008
    Posts
    384
    Rep Power
    6

    Default

    You was asking how to DIVIDE?..?
    I die a little on the inside...
    Every time I get shot.

  10. #10
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Yes, looking and his last code segment, seems to me he's asking about mathematical operation in Java. If so, better to study about mathematical operations in programming, (not specific to Java)

Posting Permissions

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