Write C# program to print alphabets from a to z

Introduction

I have used Visual Studio 2012 for debugging purpose. But you can use any version of visul studio as per your availability..

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
 
public class csharpExercise
{
    static void Main(string[] args)
    {
 
        char ch;
 
        Console.WriteLine("Alphabets from a - z are: ");
        for (ch = 'a'; ch <= 'z'; ch++)
        {
            //Printing all alphabets with tab
            Console.Write(ch+"\t");
        }
 
        Console.ReadLine();
    }
}

Result

Write C# program to print alphabets from a to z
Write C# program to print alphabets from a to z

Leave a Comment

x