for ( init; condition; increment ){ statement(s);}
for ( init; condition; increment )
{
statement(s);
}
class exampleforloop { static void Main() { for (int i = 1; i <= 5; i++) { Console.WriteLine(i); } }}
class exampleforloop
static void Main()
for (int i = 1; i <= 5; i++)
Console.WriteLine(i);
Output:12345
Output:
1
2
3
4
5