Football Fans: Download the 2012 Schedule App from Google Play!


Go Back   Android Forums > Android Development > Application Development > Developer 101

Developer 101 101 Tutorials



Reply
 
LinkBack Thread Tools
Old November 3rd, 2011, 06:14 PM   #1 (permalink)
New Member
 
Join Date: Oct 2011
Posts: 8
 
Device(s):
Thanks: 6
Thanked 0 Times in 0 Posts
Default Doing calculations

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:
- The user Inputs their level, 
     - If the user inputs < 5000... 
          - It multiplies the number by 5 to get the max 
          - It multiplies the number by .2 to get the min 
     - If the user inputs 5000 < X < 24999 
          - It multiplies the number by .2 to get the min 
     - If the user inputs >25000  
          - It just displays "You can attack anyone > 5000"
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?

Booocubs is offline  
Reply With Quote
Sponsors
Old November 4th, 2011, 04:05 AM   #2 (permalink)
Member
 
Join Date: Aug 2010
Location: Norway
Posts: 308
 
Device(s): Samsung Galaxy Nexus
Thanks: 0
Thanked 52 Times in 51 Posts
Default

You should have a good grasp of Java developing before diving into android development. For this i can recommend this book: Amazon.com: Head First Java, 2nd Edition (9780596009205): Kathy Sierra, Bert Bates, Bert Bates: Books
__________________
Android: Personal Storage, Lars Monsen Facts(Norwegian)
miXer is offline  
Reply With Quote
Reply

Bookmarks


Go Back   Android Forums > Android Development > Application Development > Developer 101 User CP
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -5. The time now is 08:11 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Custom vBulletin Skins by: Relivo