User Tools

Site Tools


the_eight_queens_solver

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
the_eight_queens_solver [2012/02/21 13:12] xjiathe_eight_queens_solver [2012/02/23 14:02] (current) xjia
Line 2: Line 2:
 /* The eight queens solver */ /* The eight queens solver */
  
-int main(string[] args) {+int main(string[ ] args) {
   int N;   int N;
   int[] row, col;   int[] row, col;
Line 14: Line 14:
   d[1] = new int[N+N-1];   d[1] = new int[N+N-1];
      
 +  // fillIntArray is a contributed function
   fillIntArray(row, 0);   fillIntArray(row, 0);
   fillIntArray(col, 0);   fillIntArray(col, 0);
Line 35: Line 36:
       }       }
     }     }
-    printLine("");+    printChar('\n');
   }   }
-  printLine("")+  printChar('\n');
-  return 0;+
 } }
  
Line 56: Line 56:
     }     }
   }   }
-  return 0; 
 } }
 </code> </code>
 +
 +Note that ''fillIntArray'' is a [[contributed_functions|contributed function]].
the_eight_queens_solver.1329829936.txt.gz · Last modified: 2012/02/21 13:12 by xjia

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki