while loops c# examples
Example 1: c# while loop
int n = 0;
while (n < 5)
{
Console.WriteLine(n);
n++;
}
Example 2: c# while
int n = 0;
while (n < 5)
{
Console.WriteLine(n);
n++;
}
int n = 0;
while (n < 5)
{
Console.WriteLine(n);
n++;
}
int n = 0;
while (n < 5)
{
Console.WriteLine(n);
n++;
}