Anonim_999

7

Dec 22nd, 2022
876
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.52 KB | None | 0 0
  1. using System;
  2.  
  3. namespace ConsoleApp27
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int counter1 = 1;
  10.             int counter2 = 1;
  11.  
  12.             while (counter1 < 21)
  13.             {
  14.                 counter1 += 2;
  15.                 Console.Write($"{counter1} ");
  16.             }
  17.             Console.WriteLine();
  18.  
  19.             do
  20.             {
  21.                 counter2 += 2;
  22.                 Console.Write($"{counter2} ");
  23.             } while (counter2 < 21);
  24.         }
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment