Search This Blog

Friday, February 24, 2012

Sudoku list generation program in C-sharp


This is really a  very good program , fast and optimize

class Program
    {
        static void Main(string[] args)
        {

            const int n = 3;

            for (int i = 0; i < n * n; i++)
            {
                for (int j = 0; j < n * n; j++)
                    Console.Write((i * n + i / n + j) % (n * n) + 1);
                Console.WriteLine();
            } Console.ReadLine();
        }
    }

No comments :

Post a Comment