Hello guys! Welcome to my Blog!
Today we will be learn How to Find iteration?
first of All we should know that what is iteration
and secondly what is his work ?
The iteration is that,we can out find out how many times loop have run
its work to figure out how many times loop run
this is very simple to find iteration
How to Find Iteration?
namespace iteration
{
class Program
{
static void Main(string[] args)
{
int run=0;
for (int i=1; i<=10; i++)
{
run++;//as often as loop run the value will go inside in this integer
;
}
Console.WriteLine("The loop runs "+ (run++) +" times");
Console.ReadLine();
}
}
}
\\\
OUTPUT!
The loop runs 10 Times
Comments
Post a Comment