Results 1 to 3 of 3
  1. #1
    sh4rif is offline Member
    Join Date
    Dec 2011
    Posts
    16
    Rep Power
    0

    Post a range of numbers

    since i am doing this banking system i have a question.

    I've opned a first branch and it can have a max of 1000 customers (or any number dosent matter)
    so that branch would be allocated a 1000 accounts

    another branch opened this also has a max of 1000 customers again (list could go endless)
    this branch is also allocated 1000 accounts.

    but my issue here is, i want to allocate account numbers 1 to 1000 to first branch and 1001 to 2000 to second branch
    but how would i do that, how do you set a range of numbers to a variable ?

    or what is the best solution please help

    Regards

    Sharif

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,691
    Rep Power
    8

    Default Re: a range of numbers

    You really have not been specific enough to offer any real answer, as it really depends on what exactly you mean. You could simply use if statements to ensure that the values for the account numbers are valid. Or you could simply use a variable storing the minimum account number, and check that against how many accounts have been created to come up with a new account number.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    sh4rif is offline Member
    Join Date
    Dec 2011
    Posts
    16
    Rep Power
    0

    Default Re: a range of numbers

    thank you vey much kevin i got the idea now .... thanks once again

Similar Threads

  1. how to change numbers into word numbers?
    By akeni in forum New To Java
    Replies: 13
    Last Post: 11-18-2011, 08:46 AM
  2. How to compare Range of numbers?
    By Bagzli in forum New To Java
    Replies: 13
    Last Post: 07-03-2011, 03:11 PM
  3. Replies: 11
    Last Post: 01-14-2011, 06:36 PM
  4. Replies: 8
    Last Post: 04-19-2009, 05:50 PM
  5. printing two smallest numbers from a series of numbers
    By trofyscarz in forum New To Java
    Replies: 2
    Last Post: 10-14-2008, 11:46 PM

Posting Permissions

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