Advertisement
Guest User

Untitled

a guest
Dec 15th, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. using System;
  2.  
  3. namespace ConsoleApp4
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. char sector = char.Parse(Console.ReadLine());
  10. int firstSector = int.Parse(Console.ReadLine());
  11. int place = int.Parse(Console.ReadLine());
  12.  
  13. int count = 0;
  14.  
  15. for (char i = 'A'; i <= sector; i++)
  16. {
  17. for (int j = 1; j <= firstSector; j++)
  18. {
  19. int places = place;
  20.  
  21. if (j % 2 == 0)
  22. {
  23. places += 2;
  24. }
  25.  
  26. for (int k = 0; k < places; k++)
  27. {
  28. Console.WriteLine($"{i}{j}{(char)(97 + k)}");
  29. count++;
  30. }
  31. }
  32.  
  33. firstSector++;
  34. }
  35.  
  36. Console.WriteLine(count);
  37. }
  38. }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement