how to create a while loop in c# code example
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++;
}