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..


techstudy.org

HP 15 Core i3 7th gen Laptop(4GB, 1TB HDD, Windows 10) | Rs. 31,490

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. public class csharpExercise
  7. {
  8. static void Main(string[] args)
  9. {
  10.  
  11. char ch;
  12.  
  13. Console.WriteLine("Alphabets from a - z are: ");
  14. for (ch = 'a'; ch <= 'z'; ch++)
  15. {
  16. //Printing all alphabets with tab
  17. Console.Write(ch+"\t");
  18. }
  19.  
  20. Console.ReadLine();
  21. }
  22. }

Result

C# language techstudy

     





Related Topics




Popular Posts