2. Edit the Program.cs inside static void Main(string[] args) file as shown below.
static void Main(string[] args) { for (int i = 0; i < 10; i++) { Console.WriteLine("Hello World!"); } Console.WriteLine("Press any key to continue....."); Console.ReadLine(); }
4. Thank you.
The for-loop statement is used perform a piece of code multiple times as long as the condition set is evaluated to true. Its syntax is:
for(<initialization>;<condition>;<incrementation/decrementation>)
{
//code to execute
}
No comments:
Post a Comment