1. Download our Official Android App: Forums for Android!

Apps Doing calculations

Discussion in 'Android Development' started by Booocubs, Nov 3, 2011.

  1. Booocubs

    Booocubs Newbie
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    11
    Joined:
    Oct 22, 2011

    Oct 22, 2011
    11
    0
    15
    I'm creating a VERY simple application for android, for a game (Ogame).
    Now I may add on to this application, but for now this is all I want it to do;
    Code (Text):
    1.  
    2. - The user Inputs their level,
    3.      - If the user inputs < 5000...
    4.           - It multiplies the number by 5 to get the max
    5.           - It multiplies the number by .2 to get the min
    6.      - If the user inputs 5000 < X < 24999
    7.           - It multiplies the number by .2 to get the min
    8.      - If the user inputs >25000  
    9.           - It just displays "You can attack anyone > 5000"
    10.  
    My question is; how do you use variables (Such as input = X) and then from there us that X in equations to create an output?
     

    Advertisement

  2. miXer

    miXer Android Enthusiast
    Rank:
    None
    Points:
    53
    Posts:
    313
    Joined:
    Aug 12, 2010

    Aug 12, 2010
    313
    51
    53
    Norway

Share This Page

Loading...