Advertisement
spasnikolov131

Untitled

Feb 13th, 2024
14
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. using System;
  2.  
  3. class Program
  4. {
  5. static void Main()
  6. {
  7. int a = int.Parse(Console.ReadLine());
  8. int b = int.Parse(Console.ReadLine());
  9. int max = int.Parse(Console.ReadLine());
  10. int counter = 0;
  11. string combination = string.Empty;
  12.  
  13.  
  14.  
  15. for (int A = 35; A <= 55; A++)
  16. {
  17. for (int B = 64; B <= 96; B++)
  18. {
  19. for (int x = 1; x <= a; x++)
  20. {
  21. for (int y = 1; y <= b; y++)
  22. {
  23. combination = $"{(char)A}{(char)B}{x}{y}{(char)B}{(char)A}|";
  24.  
  25. if (counter < max)
  26. {
  27. Console.Write(combination);
  28. }
  29. A++;
  30. B++;
  31. if (A > 55)
  32. {
  33. A = 35;
  34. }
  35. else if (B > 96)
  36. {
  37. B = 64;
  38. }
  39. counter++;
  40.  
  41. //combination = string.Empty;
  42.  
  43. }
  44. }
  45. }
  46. }
  47.  
  48. }
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement