Prime Minister of Singapore posted the source code of his program solving Sudoku



    Among the national leaders of different countries there are not many who are well versed in modern technology. And even fewer can write a program on their own. It seems that Singapore is very lucky with its prime minister - in addition to solving important state problems, Li Xianlong can write C ++ programs. The other day, Xianlong shared his Sudoku solver, plus the program source code.

    The Prime Minister mentioned this program in his address to representatives of the IT industry on April 20. It is worth noting that he wrote the program several years ago, now the Prime Minister simply does not have time for this.

    However, Li Xianlong’s children work in the IT field, both graduated from MIT. After the Prime Minister completed the speech, several people turned to him at once with a request to show his program.

    Which was done. Here is the source code of the software, with an example of work, as well as a finished program. All this works on the command line, in the Windows environment. In order to start work, you need to enter data line by line, for example, 1-3-8 --- 6.

    By the way, if someone will evaluate the program - write in the comments if the code written by the prime minister is good. Wiki

    Quick Reference :Li Xianlong (Chinese trade. 李顯龍, ex. 李显龙, pinyin: Lǐ Xiǎn Lóng, English Lee Hsien Loong, born February 10, 1952, Singapore) - Prime Minister of Singapore from August 12, 2004, succeeded Guo Chok Tong; Minister of Finance from 2001 to December 1, 2007. Chairman of the ruling party PND. The eldest son of former Prime Minister Lee Kuan Y.
    Graduated from mathematics at Trinity College, University of Cambridge. He served in the army. He has held various ministerial posts.

    Also popular now: