Spocoman

03. Numbers 1...N with Step 3

Nov 19th, 2021 (edited)
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.31 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Number1ToNWithStep3
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int num = int.Parse(Console.ReadLine());
  10.             for (int i = 1; i <= num; i+=3)
  11.             {
  12.                 Console.WriteLine(i);
  13.             }
  14.         }
  15.     }
  16. }
Add Comment
Please, Sign In to add comment