Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to print multiple blank lines in C#?
To display multiple blank lines, we will take a while loop.
Here, we are printing 10 blank lines using Console.WriteLine();
while (a < 10) {
Console.WriteLine(" ");
a++;
}
The following is the complete code to display multiple blank lines −
Example
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();
}
}
}Advertisements