
posted : Sunday, September 28, 2008
title :
5am now and here i am still programming that sudoku
can i swear??? ^*%^&$*&$* BUT i wanna say im 3/4 done already!! thanks to tenglee. i must say she has been patient with me for 2hours not giving me the answer but explain to me how it works all the way from basic. cause c++ is really not a good friend of mine though im still stuck at the most complicated part. im so HAPPY! hahahaha and to people who thinks sudoku is damn easy to play its not easy to programme it out my task now is only to test run the 4 sudoku puzzles given to us see which has repeated numbers and where exactly has they repeated its already so tough imagine trying to programme which number to cover up and forming the whole 81 squares. wth. they are crazy im feeling nausea now. staring at numbers on the screen for 4hours here is part of what i have to do: for(int row=1;row<=9;row++) { bool HasOccurred [9]; // HasOccurred [i]== true will mean that // i has occurred already for(int i=1;i <=9; i++) HasOccurred [i]= false ; int number ; for(int j=0;j <9; j++) {number = S[(row-1)*9+j]; if( HasOccurred [ number ]) cout number " is covered twice in row" row endl; HasOccurred [ number ]= true ; } } im going to sleep=) |