Để hiển thị nhiều dòng trống, chúng tôi sẽ mất một khoảng thời gian.
Ở đây, chúng tôi đang in 10 dòng trống bằng Console.WriteLine ();
while (a < 10) {
Console.WriteLine(" ");
a++;
} Sau đây là mã hoàn chỉnh để hiển thị nhiều dòng trống -
Ví dụ
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!\n");
Console.ReadLine();
}
}
}