1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

Question about pseudo code

Discussion in 'Programming' started by doc345, Oct 24, 2012.

  1. doc345

    doc345 New Member

    so i am working on this section of psuedo code and i got stuck on this array that determines which kennel to put the dog into based on their weight, their are 8 kennels they are as follow
    Kennel Number ~ weightrange
    1 under 50 lbs
    2 under 50 lbs
    3 up to 99 lbs
    4 up to 99 lbs
    5 up to 99 lbs
    6 up to 99 lbs
    7 100 lbs and over
    8 100 lbs and over
    im trying to build a parallel array that would put the dog into the first available based on its rate. this is what i have so far. i just cant seem to figure out how to make it work.
    mainly because it asks for under and over if it was one of the other i could make it work.

    num dogweight
    num KENNELNUM[size] 1,2,3,4,5,6,7,8
    num WEIGHTRANGE[size] 50,50,99,99,99,99,100,100
    num size =8
    num y
    y = 0
    while dogWeight >= WEIGHTRANGE[Y]
    y = y + 1
  2. doc345

    doc345 New Member

    rate is supposed to be weight
    and i already have a section of code that determines the dog weight.

Share This Page