14.4k views
3 votes
Given the code below, how many times would "I love C#" be output to the Console Window?

1
int counter = 10;
2
do {
3
Console.WriteLine("I love C#");
4
counter--;
5
}while (counter<5) ;
6
C#

0

1

10

11

Infinite Loop

User Marena
by
5.1k points

1 Answer

6 votes
The answer is 1.

Hope this helps
User CpnCrunch
by
6.2k points