Answers for "example of while loop in c#"

C#
0

while c#

int i = 0; // initialization

while (i < 10) // condition
{
    Console.WriteLine("i = {0}", i);

    i++; // increment
}
Posted by: Guest on July-03-2021
-1

C# while loop

int i = 1;
while(i != 0)
{
	//This code will loop
	Console.WriteLine("Say a number");
	i = int.Parse(Console.ReadLine());
}
Posted by: Guest on October-02-2021

C# Answers by Framework

Browse Popular Code Answers by Language