Advertisement
Guest User

Untitled

a guest
Dec 13th, 2019
748
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. using System;
  2.  
  3. namespace movieTickets_06
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. int a1 = int.Parse(Console.ReadLine());
  10. int a2 = int.Parse(Console.ReadLine());
  11. int n = int.Parse(Console.ReadLine());
  12.  
  13.  
  14. for (int i = a1; i <= a2 - 1; i++)
  15. {
  16. char letter = (char)i;
  17.  
  18. for (int symbol2 = 1; symbol2 <= n - 1; symbol2++)
  19. {
  20.  
  21. for (int symbol3 = 1; symbol3 <= (n / 2 - 1); symbol3++)
  22. {
  23.  
  24. if (i % 2 == 1 && (symbol2 + symbol3 + i) % 2 == 1)
  25. {
  26. Console.WriteLine($"{letter}-{symbol2}{symbol3}{i}");
  27. }
  28.  
  29. }
  30.  
  31. }
  32.  
  33. }
  34. }
  35. }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement