@nakov/

for-loop-1-to-5-csharp

C#

Example of for-loop from 1 to 5 in C#

fork
loading
Files
  • main.cs
  • main.exe

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.5659972833305495","path":"main.cs","file":{"path":"main.cs","content":{"asEncoding":{"base64":"dXNpbmcgU3lzdGVtOwoKY2xhc3MgRm9yTG9vcEV4YW1wbGUgewogICAgcHVibGljIHN0YXRpYyB2b2lkIE1haW4oKSB7CiAgICAgICAgZm9yIChpbnQgaSA9IDE7IGkgPD0gNTsgaSsrKQogICAgICAgIHsKICAgICAgICAgICAgQ29uc29sZS5Xcml0ZUxpbmUoaSk7CiAgICAgICAgfQogICAgfQp9Cg=="},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
using System;

class ForLoopExample {
    public static void Main() {
        for (int i = 1; i <= 5; i++)
        {
            Console.WriteLine(i);
        }
    }
}