1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Question about pseudo code

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

  1. doc345

    doc345 New Member

    Joined:
    Oct 24, 2012
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    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.

    //declrations
    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

    Joined:
    Oct 24, 2012
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    rate is supposed to be weight
    and i already have a section of code that determines the dog weight.
     

Share This Page