Thread: noob help with very simple calculation

  1. #1
    Registered User
    Join Date
    Oct 2009
    Posts
    1

    noob help with very simple calculation

    nevermind solved it! , sorry!
    Last edited by blastfromthepas; 10-31-2009 at 04:20 AM. Reason: solved

  2. #2
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    Change "result" to cars, then use this to figure tires left:

    Tires Left = Starting tires - (4 * number of cars)

    or

    Tires Left = starting tires % (4 * number of cars)

    And you should use int's as your data type, instead of floats - unless you're going to start installing just fractions of tires, or put them on fractions of cars.
    Last edited by Adak; 10-31-2009 at 04:08 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Simple pointer question but i'm a noob
    By tesla in forum C++ Programming
    Replies: 2
    Last Post: 09-20-2009, 02:12 AM
  2. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM
  3. simple noob question
    By NiVaG in forum Linux Programming
    Replies: 5
    Last Post: 09-28-2004, 06:56 PM
  4. Simple calculation not working, need help
    By Summonerur in forum C Programming
    Replies: 20
    Last Post: 09-24-2004, 02:53 PM
  5. Need help with simple DAQ program
    By canada-paul in forum C++ Programming
    Replies: 12
    Last Post: 03-15-2002, 08:52 AM