21 January 2014

C# program to print alphabets

using System;

namespace SamplePrograms
{
    class Alphabets
    {
        public static void Main()
        {
           for (char alphabet = 'A'; alphabet <= 'Z'; alphabet++)
            {
                Console.Write(alphabet + " ");
            }
            Console.ReadLine();
            for (char alphabet = 'a'; alphabet <= 'z'; alphabet++)
            {
                Console.Write(alphabet + " ");
            }
            Console.WriteLine();
        }
    }
}

No comments:

Post a Comment