IvanGeorgiev

Untitled

Jul 9th, 2020
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. using System;
  2.  
  3. namespace ConsoleApp27
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. int a = int.Parse(Console.ReadLine());
  10. int b = int.Parse(Console.ReadLine());
  11. int max = int.Parse(Console.ReadLine());
  12. int couter = 0;
  13. for (int A = 35; A <= 55; A++)
  14. {
  15. for (int B = 64; B <= 96; B++)
  16. {
  17. for (int x = 1; x <= a; x++)
  18. {
  19. for (int y = 1; y <= b; y++)
  20. {
  21. couter++;
  22. if(x==a && y == b)
  23. {
  24. break;
  25. }
  26. else if (couter >= max)
  27. {
  28. break;
  29. }
  30. Console.WriteLine($"{(char)A}{(char)B}{x}{y}{(char)A}{(char)B}");
  31. }
  32. }
  33. }
  34. }
  35. }
  36. }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment