Advertisement
dimitarbogdanov

ascii

Jun 3rd, 2023
819
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.53 KB | None | 0 0
  1. int n = int.Parse(Console.ReadLine()!);
  2.  
  3. int startLetter = 97;
  4.  
  5. for (int i = 0; i < n; i++)
  6. {
  7.     for (int j = 0; j < n; j++)
  8.     {
  9.         for (int k = 0; k < n; k++)
  10.         {
  11.             char firstLetter = (char) (startLetter + i);
  12.             Console.Write(firstLetter);
  13.            
  14.             char secondLetter = (char) (startLetter + j);
  15.             Console.Write(secondLetter);
  16.            
  17.             char thirdLetter = (char) (startLetter + k);
  18.             Console.WriteLine(thirdLetter);
  19.         }
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement