You can use a simple for loop to achieve this task in C# as follows:
main.cs63 chars5 lines
In the above loop, we have initialized a counter variable i
to 0 and the loop will continue until the condition i<4
is true. The Console.WriteLine("Joe Biden");
statement is executed four times as the loop runs because it is within the loop code block.
gistlibby LogSnag