Advertisement
dayana_Velkova

Untitled

Jun 23rd, 2020
607
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. using System;
  2.  
  3. namespace WeddingSeats
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. char sector = char.Parse(Console.ReadLine());
  10. int rows = int.Parse(Console.ReadLine());
  11. int seats = int.Parse(Console.ReadLine());
  12. int factor = 0;
  13. int counter = 0;
  14. for (char i = 'A'; i <= sector; i++, rows++)
  15. {
  16. for (int j = 1; j <= rows; j++)
  17. {
  18. factor = (j % 2 == 0) ? 2 : 0;
  19. for (char k = 'a'; k < 'a' + seats + factor; k++)
  20. {
  21. Console.WriteLine($"{i}{j}{k}");
  22. counter++;
  23. }
  24.  
  25. }
  26. }
  27. }
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement