0

How to print alphabets in c# using do while and while loop?

help me to make this program

5th Aug 2018, 6:10 AM
Raavanan
Raavanan - avatar
2 Answers
+ 3
Maybe like this: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SoloLearn { class Program { static void Main(string[] args) { string a = "abcdefghijklmnopqrstwxyz"; int i = 0; do { Console.WriteLine(a.Substring(i,1)); i++; } while(i < a.Length); // foreach(char c in a) // {Console.WriteLine(c); // } } } }
5th Aug 2018, 6:35 AM
Paul
Paul - avatar
+ 1
Thanks Paul Jacobs
5th Aug 2018, 7:21 AM
Raavanan
Raavanan - avatar