OldBeliver

Cycles_05

Mar 8th, 2021 (edited)
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.77 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace CSharpCycles05
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int startCycle = 7;
  14.             int endCycle = 98;
  15.             int step = 7;
  16.             string spacer = ", ";
  17.  
  18.             for (int i = startCycle; i <= endCycle; i+=step)
  19.             {
  20.                 Console.Write(i + spacer);
  21.             }
  22.             Console.WriteLine("\b\b.");
  23.            
  24.             startCycle = 7;
  25.             endCycle = 100;
  26.             for (int i = startCycle; i < endCycle; i += step)
  27.             {
  28.                 Console.WriteLine(i);
  29.             }
  30.             Console.ReadKey();
  31.         }
  32.     }
  33. }
  34.  
Add Comment
Please, Sign In to add comment