Tuesday, 4 December 2012

Reverse Printing


Reverse Printing

         
 
            // Reverse Printing


            Console.WriteLine("Enter some digits to get there reverse");
            int a = int.Parse(Console.ReadLine());

            for (; a != 0; a = a / 10)
            {

                Console.Write(a % 10);

            }
            Console.ReadLine();

No comments:

Post a Comment