Create 50 element boolean array, set first 25 elements true, rest false

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mary Seelye
    New Member
    • Oct 2010
    • 14

    #1

    Create 50 element boolean array, set first 25 elements true, rest false

    I don't even know where to start with this or figure out how to get them to display. I need the first 25 to be true and the last 25 to be false.

    I need all the trues and falses to display.
  • Dheeraj Joshi
    Recognized Expert Top Contributor
    • Jul 2009
    • 1129

    #2
    I guess you don't have a code for this. Follow this algorithm.

    1)Take a boolean array of size 50
    2)Loop through first 25 elements of the array and set the value to TRUE.
    3)Continue looping for next 25 elements and set the value to FALSE.

    Regards
    Dheeraj Joshi
    Last edited by Dormilich; Nov 23 '10, 06:44 AM.

    Comment

    • Mary Seelye
      New Member
      • Oct 2010
      • 14

      #3
      thank you!

      Comment

      Working...