anizko

02. Numbers 1...N with Step 3

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