StoimenK

2.6.Triples_of_Latin_Letters

Jan 26th, 2020
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.79 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 _2._6.Triples_of_Latin_Letters
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int num = int.Parse(Console.ReadLine());
  14.  
  15.             for (int i = 0; i < num; i++)
  16.             {
  17.                 char first = (char)('a' + i);
  18.  
  19.                 for (int j = 0; j < num; j++)
  20.                 {
  21.                     char second = (char)('a' + j);
  22.  
  23.                     for (int k = 0; k < num; k++)
  24.                     {
  25.                         char third = (char)('a' + k);
  26.  
  27.                         Console.WriteLine($"{first}{second}{third}");
  28.                     }
  29.                 }
  30.             }
  31.         }
  32.     }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment