DEV Community

Ivan Ivanov
Ivan Ivanov

Posted on

3. Numbers 1...N with Step 3 (Simple Solution)

using System;

namespace Numbers_1_N_WithStep_3
{
internal class Program
{
    static void Main(string[] args)
    {
        int n = int.Parse(Console.ReadLine());

        for (int number = 1; number <= n; number += 3)
        {
            Console.WriteLine(number);
        }
    }
}
}
Enter fullscreen mode Exit fullscreen mode

Top comments (0)