How to print alphabets in c# using do while and while loop? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
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 Respostas
+ 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