Eight Queens, continued
/* Solve the Eight Queens problem. */
static void main(String args[]))
/* R[c] is row of queen in column c,
int [] R = { 0, 1, 2, 3, 4, 5, 6, 7 };
/* Consider each permutation of R until
one is found that represents a solution,
or loop forever. */
while ( same_diagonal(R) )