Home >Backend Development >C#.Net Tutorial >How to print multiple blank lines in C#?
To display multiple empty lines, we will use a while loop.
Here, we use Console.WriteLine() to print 10 blank lines;
while (a < 10) { Console.WriteLine(" "); a++; }
The following is the complete code to display multiple blank lines -
using System; namespace Program { public class Demo { public static void Main(String[] args) { int a = 0; while (a < 10) { Console.WriteLine(" "); a++; } Console.WriteLine("Displayed 10 blank lines above!"); Console.ReadLine(); } } }
The above is the detailed content of How to print multiple blank lines in C#?. For more information, please follow other related articles on the PHP Chinese website!