Re: "Eight Queens" program

Discussion in 'C Programming' started by SM Ryan, Aug 21, 2004.

  1. SM Ryan

    SM Ryan Guest

    (Matt) wrote:
    # I will be grateful if someone explians this part
    #
    # colfree[c] = FALSE;
    # upfree[row+c] = FALSE;
    # downfree[row-c+7] = FALSE;
    #
    # of the code below. I don't understand how this marks the downward and
    # upward diagonals. How does downfree[row-c+7] mark the diagonal?

    I think this is from Wirth's article on structured programming. If you
    look up the article, it explains Wirth's philosophy and includes the
    derivation of an eight queens program to illustrate the principles.

    --
    SM Ryan http://www.rawbw.com/~wyrmwif/
    The little stoner's got a point.
    --
    comp.lang.c.moderated - moderation address:
     
    SM Ryan, Aug 21, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. cfanatic
    Replies:
    3
    Views:
    561
    cfanatic
    Oct 16, 2003
  2. jblazi

    The eight queens problem

    jblazi, Aug 30, 2004, in forum: C++
    Replies:
    9
    Views:
    2,557
    Karl Heinz Buchegger
    Aug 30, 2004
  3. Jeff Epler
    Replies:
    10
    Views:
    667
    Anton Vredegoor
    Aug 20, 2003
  4. Matt

    "Eight Queens" program

    Matt, Aug 18, 2004, in forum: C Programming
    Replies:
    5
    Views:
    463
    -berlin.de
    Aug 21, 2004
  5. sathya_me

    Is this OT(was:Re: "Eight Queens" program)

    sathya_me, Aug 20, 2004, in forum: C Programming
    Replies:
    5
    Views:
    314
    sathya_me
    Aug 20, 2004
Loading...

Share This Page