c# while do loop code example
Example 1: c# do while loop
do {
statement(s);
} while( condition );
_______________EX.___________________
int i = 0;
do
{
Console.WriteLine(i);
i++;
}
while (i < 5);
============OUTPUT======================
0
1
2
3
4
Example 2: c# while loop
int n = 0;
while (n < 5)
{
Console.WriteLine(n);
n++;
}